EhLib
ContentsIndexHome
PreviousUpNext
Customizing in place editor in grid cell

Banning of text editing in the cell. 

Use property column TextEditing to ban text editing in the cell. It is allowed to ban text editing dynamically in the OnGetCellParams event. In the event use Params.TextEditing parameter to allow or ban text editing. 

Several fields in the dropdown lookup list. 

Fill olumn.LookupDisplayFields by the list of fields to show several fields in lookup list for lookup fields. Semicolons should separate multiple field names. Name Column.Field.LookupResultField must be present in LookupDisplayFields list. Lookup list with several fields can be applied only for lookup fields. 

Column with simple lookup values. 

You can show another text in column depending on field values. Use KeyList and PickList property. KeyList have to contain values which kept in the field and PickList have to contain a values to show corresponding lines. Set Column.NotInKeyListIndex to the index of line from PickList that will be shown if the field value is not contained in the KeyList (for instance you can set index of line for Null field value). Set Column.DblClickNextval to True value to allow user to change value in the cell by double click. 

Dropdown calendar. 

For TDateField and TDateTimeField fields In-place Editor will show dropdown button to show dropdown calendar. Set Column.ButtonStyle to cbsNone to prevent showing the dropdown button. 

In-place Editor Color and Font. 

In-place Editor takes Color and Font from cell color. Cell takes Color and Font from Column Color and Font, and OnGetCellParams event. In-place Editor automatically set multiline mode when row height bigger than the height of a text line and property WordWrap for column is True.

Customize the SubtitleFilter filtering columns.

Use the sub-properties of property TDBGridEh.STFilter to customize the display area of the filter data by columns (called Subtitle Filter). This is usually a separate line just under the heading Grid. However, you can configure this field so that it appears in the header as a button drop-down list. In version 6, the opportunity to customize the color of cells dividing lines color, font and icon display mode drop-down list. 

TDBGridEh.STFilter

Property name 
Property type 
Description 
InstantApply 
Boolean 
Defines if filter will be applied on changing or closing of dropped down list of filtered values (STFilter) 
Local 
Boolean 
Grid does not use it, but object that perform filtering can determine whether it will filter locally in dataset or on the server (by adding filter expressions in SQL 'WHERE' clause) 
Location 
TSTFilterLocationEh 
Defines the location STFilter. Under the title (stflUnderTitleFilterEh) or in the title (stflInTitleFilterEh). When in the title then STFilter doesn't support edit line to enter filter expression. 
Visible 
Boolean 
Specifies whether the filter row is visible. 
Color 
TColor 
Specifies the background color for the title cells. 
Font 
TFont 
Controls the font in which the title cells displays its data. 
ParentFont 
Boolean 
Determines where a control looks for its font information. 
HorzLineColor 
TColor 
Color of the horizontal lines in the footer area. 
RowHeight 
Integer 
Specifies the height of footer row in text lines. 
RowLines 
Integer 
Specifies the height of footer row in text lines.
Full row height = height in pixels of RowLines + RowHeight. 
VertLineColor 
TColor 
Color vertical lines in the footer area. 
FilterButtonDrawTime 
TDBGridFilter
ButtonDrawTimeEh 
Specifies when it is to draw buttons for DroppedDown filter list. 
Copyright (c) 1998-2013. All rights reserved.
What do you think about this topic? Send feedback!