1218 |
How can I save the changes, such as column's width, order
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control. procedure TWinForm1.AxGrid1_ClickEvent(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin Layout := 'Select="0";SingleSort="C0:2";Columns=1'; end end; with AxGrid1 do begin BeginUpdate(); Columns.Add('Column'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; EndUpdate(); end |
1217 |
How can I add totals to groups without having to go through the AddGroupItem grid function
with AxGrid1 do begin FreezeEvents(True); BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with ConditionalFormats do begin with Add('%CT1',Nil) do begin ForeColor := $808080; ApplyTo := EXGRIDLib.FormatApplyToEnum($1); end; with Add('%CT2',Nil) do begin ForeColor := $808080; ApplyTo := EXGRIDLib.FormatApplyToEnum($2); end; with Add('%CT3',Nil) do begin ForeColor := $808080; ApplyTo := EXGRIDLib.FormatApplyToEnum($3); end; end; with Columns do begin Add('Description'); with (Add('Qty') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%1)'; end; with (Add('Price') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'avg(current,rec,%2)'; Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; end; with (Add('Amount') as EXGRIDLib.Column) do begin ComputedField := '%1 * %2'; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%3)'; end; end; with Items do begin r := AddItem('Root'); g1 := InsertItem(r,Nil,'Group 1'); h := InsertItem(g1,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(1); CellValue[TObject(h),TObject(2)] := TObject(10); h := InsertItem(g1,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(2); CellValue[TObject(h),TObject(2)] := TObject(11); g2 := InsertItem(r,Nil,'Group 2'); h := InsertItem(g2,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(3); CellValue[TObject(h),TObject(2)] := TObject(12); h := InsertItem(g2,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(4); CellValue[TObject(h),TObject(2)] := TObject(13); ExpandItem[0] := True; end; EndUpdate(); FreezeEvents(False); end |
1216 |
How can I configure the filters in the text columns to search by content
with AxGrid1 do begin BeginUpdate(); FilterBarPromptVisible := EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible; HeaderAppearance := EXGRIDLib.AppearanceEnum.None2; FilterBarPromptType := EXGRIDLib.FilterPromptEnum.exFilterPromptContainsAll; Columns.Add('Names'); with Items do begin AddItem('Mantel'); AddItem('Mechanik'); AddItem('Motor'); AddItem('Murks'); AddItem('Märchen'); AddItem('Möhren'); AddItem('Mühle'); AddItem('Sérigraphie'); end; FilterBarPromptPattern := 'a'; EndUpdate(); end |
1215 |
How can I display the control's captions in Spanish
with AxGrid1 do begin BeginUpdate(); FilterBarPromptVisible := EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible; HeaderAppearance := EXGRIDLib.AppearanceEnum.None2; set_Description(EXGRIDLib.DescriptionTypeEnum.exFilterBarAll,'(todo) '); set_Description(EXGRIDLib.DescriptionTypeEnum.exFilterBarFilterForCaption,'filtrar por...'); FilterBarPrompt := '<i><fgcolor=808080>iniciar filtro...</fgcolor></i>'; with (Columns.Add('Names') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterType := EXGRIDLib.FilterTypeEnum.exPattern; end; with Items do begin AddItem('Mantel'); AddItem('Mechanik'); AddItem('Motor'); AddItem('Murks'); AddItem('Märchen'); AddItem('Möhren'); AddItem('Mühle'); AddItem('Sérigraphie'); end; EndUpdate(); end |
1214 |
How can I zoom in the control
with AxGrid1 do begin BeginUpdate(); s1 := 16; s2 := FormatABC('2 * value',TObject(s1),Nil,Nil); ImageSize := s2; DefaultItemHeight := s2; HeaderHeight := s2; SortBarHeight := s2; Indent := s2; Font.Size := s1; FilterBarFont.Size := s1; ToolTipFont.Size := s1; FilterBarPromptVisible := EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible; HeaderAppearance := EXGRIDLib.AppearanceEnum.None2; with (Columns.Add('Names') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterType := EXGRIDLib.FilterTypeEnum.exPattern; end; with Items do begin AddItem('Mantel'); AddItem('Mechanik'); AddItem('Motor'); AddItem('Murks'); AddItem('Märchen'); AddItem('Möhren'); AddItem('Mühle'); AddItem('Sérigraphie'); end; EndUpdate(); end |
1213 |
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Items') as EXGRIDLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := True; Def[EXGRIDLib.DefColumnEnum.exFilterPatternTemplate] := '*<%filter%>*'; FilterType := EXGRIDLib.FilterTypeEnum.exPattern; Filter := '1'; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; ApplyFilter(); EndUpdate(); end |
1212 |
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; ColumnAutoResize := False; Columns.Add('Column 1'); Columns.Add('Column 2'); Columns.Add('Column 3'); Columns.Add('Column 4'); EndUpdate(); end |
1211 |
Load data as a tree using a parent-id relationship
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Select * FROM Employees WHERE 1=0','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); Columns.Item[TObject(0)].Width := 128; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Employees','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb',3,3,Nil); end; PutItems(rs.GetRows(Nil,Nil,Nil),';0;17'); Items.ExpandItem[0] := True; EndUpdate(); end |
1210 |
Is there a way to change the contents of the drop down editor based on a value in another column
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddItemEvent); begin with AxGrid1 do begin Items.CellEditorVisible[TObject(e.item),TObject(0)] := EXGRIDLib.EditorVisibleEnum.exEditorVisible; Items.CellEditorVisible[TObject(e.item),TObject(1)] := EXGRIDLib.EditorVisibleEnum.exEditorVisible; end end; // EditOpen event - Occurs when the edit operation starts. procedure TWinForm1.AxGrid1_EditOpen(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin with Items do begin v := CellValue[TObject(FocusItem),TObject(0)]; c := CellCaption[TObject(FocusItem),TObject(0)]; end; with Columns.Item[TObject(1)].Editor do begin ClearItems(); AddItem(v,c,Nil); end; end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; with (Columns.Add('DropDownList') as EXGRIDLib.Column) do begin with Editor do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; AddItem(1,'First',Nil); AddItem(2,'Second',Nil); AddItem(3,'Third',Nil); end; end; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; (Columns.Add('DropDownList-Related') as EXGRIDLib.Column).Editor.EditType := EXGRIDLib.EditTypeEnum.DropDownListType; with Items do begin CellValue[TObject(AddItem(TObject(1))),TObject(1)] := TObject(-1); CellValue[TObject(AddItem(TObject(2))),TObject(1)] := TObject(-1); CellValue[TObject(AddItem(TObject(3))),TObject(1)] := TObject(-1); LockedItemCount[EXGRIDLib.VAlignmentEnum.exBottom] := 1; h := LockedItem[EXGRIDLib.VAlignmentEnum.exBottom,0]; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXGRIDLib.DividerAlignmentEnum.DividerTop; CellEditorVisible[TObject(h),TObject(0)] := EXGRIDLib.EditorVisibleEnum.exEditorHidden; CellSingleLine[TObject(h),TObject(0)] := EXGRIDLib.CellSingleLineEnum.exCaptionWordWrap; CellValueFormat[TObject(h),TObject(0)] := EXGRIDLib.ValueFormatEnum.exHTML; CellValue[TObject(h),TObject(0)] := 'The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection ' + 'on the first column.'; end; EndUpdate(); end |
1209 |
Highlight the editable fields
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin FreezeEvents(True); BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with ConditionalFormats do begin with Add('%CE1',Nil) do begin Bold := True; BackColor := $f5f5f5; ApplyTo := EXGRIDLib.FormatApplyToEnum($1); end; with Add('%CE2',Nil) do begin Bold := True; BackColor := $f5f5f5; ApplyTo := EXGRIDLib.FormatApplyToEnum($2); end; with Add('%CE3',Nil) do begin Bold := True; BackColor := $f5f5f5; ApplyTo := EXGRIDLib.FormatApplyToEnum($3); end; end; with Columns do begin Add('Description'); with (Add('Qty') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%1)'; end; with (Add('Price') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'avg(current,rec,%2)'; Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; end; with (Add('Amount') as EXGRIDLib.Column) do begin ComputedField := '%1 * %2'; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%3)'; end; end; with Items do begin r := AddItem('Root'); g1 := InsertItem(r,Nil,'Group 1'); h := InsertItem(g1,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(1); CellValue[TObject(h),TObject(2)] := TObject(10); h := InsertItem(g1,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(2); CellValue[TObject(h),TObject(2)] := TObject(11); g2 := InsertItem(r,Nil,'Group 2'); h := InsertItem(g2,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(3); CellValue[TObject(h),TObject(2)] := TObject(12); h := InsertItem(g2,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(4); CellValue[TObject(h),TObject(2)] := TObject(13); ExpandItem[0] := True; end; EndUpdate(); FreezeEvents(False); end |
1208 |
Highlight the total fields
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin FreezeEvents(True); BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with ConditionalFormats do begin with Add('%CT1',Nil) do begin ForeColor := $808080; ApplyTo := EXGRIDLib.FormatApplyToEnum($1); end; with Add('%CT2',Nil) do begin ForeColor := $808080; ApplyTo := EXGRIDLib.FormatApplyToEnum($2); end; with Add('%CT3',Nil) do begin ForeColor := $808080; ApplyTo := EXGRIDLib.FormatApplyToEnum($3); end; end; with Columns do begin Add('Description'); with (Add('Qty') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%1)'; end; with (Add('Price') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'avg(current,rec,%2)'; Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; end; with (Add('Amount') as EXGRIDLib.Column) do begin ComputedField := '%1 * %2'; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%3)'; end; end; with Items do begin r := AddItem('Root'); g1 := InsertItem(r,Nil,'Group 1'); h := InsertItem(g1,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(1); CellValue[TObject(h),TObject(2)] := TObject(10); h := InsertItem(g1,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(2); CellValue[TObject(h),TObject(2)] := TObject(11); g2 := InsertItem(r,Nil,'Group 2'); h := InsertItem(g2,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(3); CellValue[TObject(h),TObject(2)] := TObject(12); h := InsertItem(g2,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(4); CellValue[TObject(h),TObject(2)] := TObject(13); ExpandItem[0] := True; end; EndUpdate(); FreezeEvents(False); end |
1207 |
Highlight the leaf items
with AxGrid1 do begin BeginUpdate(); ConditionalFormats.Add('%CC0=0',Nil).ForeColor := $808080; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with Columns do begin (Add('Item') as EXGRIDLib.Column).Width := 16; Add('Desc'); end; with Items do begin hR := AddItem('Root'); CellValue[TObject(hR),TObject(1)] := 'The root directory /'; ExpandItem[hR] := True; h := InsertItem(hR,Nil,'Home'); CellValue[TObject(h),TObject(1)] := 'The home directory with user directories Alice and Bob'; InsertItem(h,Nil,'Alice'); InsertItem(h,Nil,'Bob'); ExpandItem[h] := True; h := InsertItem(hR,Nil,'Etc'); CellValue[TObject(h),TObject(1)] := 'The etc directory with one configuration file'; h := InsertItem(h,Nil,'nginx.conf'); CellValue[TObject(InsertItem(hR,Nil,'Var')),TObject(1)] := 'The var directory'; end; EndUpdate(); end |
1206 |
Highlight the parent items
with AxGrid1 do begin BeginUpdate(); ConditionalFormats.Add('%CC0',Nil).ForeColor := $ff; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with Columns do begin (Add('Item') as EXGRIDLib.Column).Width := 16; Add('Desc'); end; with Items do begin hR := AddItem('Root'); CellValue[TObject(hR),TObject(1)] := 'The root directory /'; ExpandItem[hR] := True; h := InsertItem(hR,Nil,'Home'); CellValue[TObject(h),TObject(1)] := 'The home directory with user directories Alice and Bob'; InsertItem(h,Nil,'Alice'); InsertItem(h,Nil,'Bob'); ExpandItem[h] := True; h := InsertItem(hR,Nil,'Etc'); CellValue[TObject(h),TObject(1)] := 'The etc directory with one configuration file'; h := InsertItem(h,Nil,'nginx.conf'); CellValue[TObject(InsertItem(hR,Nil,'Var')),TObject(1)] := 'The var directory'; end; EndUpdate(); end |
1205 |
Highlight the item being expanded or collapsed
with AxGrid1 do begin BeginUpdate(); ConditionalFormats.Add('%CX0',Nil).Bold := True; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with Columns do begin (Add('Item') as EXGRIDLib.Column).Width := 16; Add('Desc'); end; with Items do begin hR := AddItem('Root'); CellValue[TObject(hR),TObject(1)] := 'The root directory /'; ExpandItem[hR] := True; h := InsertItem(hR,Nil,'Home'); CellValue[TObject(h),TObject(1)] := 'The home directory with user directories Alice and Bob'; InsertItem(h,Nil,'Alice'); InsertItem(h,Nil,'Bob'); ExpandItem[h] := True; h := InsertItem(hR,Nil,'Etc'); CellValue[TObject(h),TObject(1)] := 'The etc directory with one configuration file'; h := InsertItem(h,Nil,'nginx.conf'); CellValue[TObject(InsertItem(hR,Nil,'Var')),TObject(1)] := 'The var directory'; end; EndUpdate(); end |
1204 |
I am using exTotalColumn. Is there an option to exclude specific cells to display the total
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin FreezeEvents(True); BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with Columns do begin Add('Description'); with (Add('Qty') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%1)'; end; with (Add('Price') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'avg(current,rec,%2)'; Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; end; with (Add('Amount') as EXGRIDLib.Column) do begin ComputedField := '%1 * %2'; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%3)'; end; end; with Items do begin r := AddItem('Root'); g1 := InsertItem(r,Nil,'Group 1'); FormatCell[TObject(g1),TObject(2)] := '`<average missing>`'; CellEditorVisible[TObject(g1),TObject(2)] := EXGRIDLib.EditorVisibleEnum.exEditorHidden; CellBold[TObject(g1),TObject(2)] := True; CellForeColor[TObject(g1),TObject(2)] := $ff; h := InsertItem(g1,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(1); CellValue[TObject(h),TObject(2)] := TObject(10); h := InsertItem(g1,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(2); CellValue[TObject(h),TObject(2)] := TObject(11); g2 := InsertItem(r,Nil,'Group 2'); h := InsertItem(g2,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(3); CellValue[TObject(h),TObject(2)] := TObject(12); h := InsertItem(g2,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(4); CellValue[TObject(h),TObject(2)] := TObject(13); ExpandItem[0] := True; end; EndUpdate(); FreezeEvents(False); end |
1203 |
How can I add a total column
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin FreezeEvents(True); BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with Columns do begin Add('Description'); with (Add('Qty') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%1)'; end; with (Add('Price') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'avg(current,rec,%2)'; Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; end; with (Add('Amount') as EXGRIDLib.Column) do begin ComputedField := '%1 * %2'; Def[EXGRIDLib.DefColumnEnum.exTotalColumn] := 'sum(current,rec,%3)'; end; end; with Items do begin r := AddItem('Root'); g1 := InsertItem(r,Nil,'Group 1'); h := InsertItem(g1,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(1); CellValue[TObject(h),TObject(2)] := TObject(10); h := InsertItem(g1,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(2); CellValue[TObject(h),TObject(2)] := TObject(11); g2 := InsertItem(r,Nil,'Group 2'); h := InsertItem(g2,Nil,'Item 1'); CellValue[TObject(h),TObject(1)] := TObject(3); CellValue[TObject(h),TObject(2)] := TObject(12); h := InsertItem(g2,Nil,'Item 2'); CellValue[TObject(h),TObject(1)] := TObject(4); CellValue[TObject(h),TObject(2)] := TObject(13); ExpandItem[0] := True; end; EndUpdate(); FreezeEvents(False); end |
1202 |
Is it possible to disable sizing(size) the column
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; with (Columns.Add('32px') as EXGRIDLib.Column) do begin Width := 32; AllowSizing := False; end; Columns.Add('Rest'); ColumnAutoResize := True; EndUpdate(); end |
1201 |
How can I add two columns of 25% and the third of 50%
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; (Columns.Add('25%') as EXGRIDLib.Column).Width := 25; (Columns.Add('25%') as EXGRIDLib.Column).Width := 25; (Columns.Add('50%') as EXGRIDLib.Column).Width := 50; ColumnAutoResize := True; EndUpdate(); end |
1200 |
I add two columns but I see a third column
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); ColumnAutoResize := True; EndUpdate(); end |
1199 |
I lose the hierarchy, all items are on the same 1st level, while I use PutItems
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('C1'); Columns.Add('C2'); with Items do begin CellValue[TObject(AddItem('Emily')),TObject(1)] := 'William'; CellValue[TObject(AddItem('Sophia')),TObject(1)] := 'Alexander'; end; PutItems(GetItems(''),Items.ItemByIndex[0]); PutItems(GetItems(''),Items.ItemByIndex[1]); PutItems(GetItems(''),Items.ItemByIndex[6]); Items.ExpandItem[0] := True; EndUpdate(); end |
1198 |
Column width set by code is ignored or it seems that does not work
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; (Columns.Add('C1') as EXGRIDLib.Column).Width := 32; (Columns.Add('C2') as EXGRIDLib.Column).Width := 132; (Columns.Add('C3') as EXGRIDLib.Column).Width := 264; EndUpdate(); end |
1197 |
I want to display this computed value in a TextBox outside the grid and get it updated with any change of its value. How can this be done
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); with Items do begin OutputDebugString( 'Total: ' ); OutputDebugString( CellCaption[TObject(LockedItem[EXGRIDLib.VAlignmentEnum.exTop,0]),TObject(0)] ); end; end end; with AxGrid1 do begin BeginUpdate(); with (Columns.Add('Numbers') as EXGRIDLib.Column) do begin with Editor do begin Numeric := EXGRIDLib.NumericEnum.exInteger; EditType := EXGRIDLib.EditTypeEnum.SpinType; end; SortType := EXGRIDLib.SortTypeEnum.SortNumeric; end; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXGRIDLib.VAlignmentEnum.exTop,0]; ItemBackColor[h] := $f0f0f0; CellValue[TObject(h),TObject(0)] := 'sum(all,dir,dbl(%0))'; CellValueFormat[TObject(h),TObject(0)] := EXGRIDLib.ValueFormatEnum.exTotalField; CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.RightAlignment; FormatCell[TObject(h),TObject(0)] := '''Total: ''+value'; end; with Items do begin AddItem(TObject(10)); AddItem(TObject(25)); AddItem(TObject(31)); AddItem(TObject(48)); end; EndUpdate(); end |
1196 |
Disable temporarily the column's sort, resize and drag and drop
with AxGrid1 do begin BeginUpdate(); SortBarVisible := True; SortBarCaption := '<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)'; AllowGroupBy := True; HeaderEnabled := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; (Columns.Add('Index') as EXGRIDLib.Column).FormatColumn := '1 index ``'; (Columns.Add('Pos') as EXGRIDLib.Column).FormatColumn := '1 apos ``'; (Columns.Add('Edit') as EXGRIDLib.Column).Editor.EditType := EXGRIDLib.EditTypeEnum.EditType; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; GridLineColor := Color.FromArgb(224,224,224); EndUpdate(); end |
1195 |
I wonder if it’s possible to highlight/select a column like Excel
// ColumnClick event - Fired after the user clicks on column's header. procedure TWinForm1.AxGrid1_ColumnClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ColumnClickEvent); begin // Column.Selected = True // FocusColumnIndex = Column.Index with AxGrid1 do begin Columns.Item[TObject(0)].Selected := False; Columns.Item[TObject(1)].Selected := False; Columns.Item[TObject(2)].Selected := False; Items.SelectAll(); end end; with AxGrid1 do begin BeginUpdate(); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; MarkSearchColumn := False; SingleSel := False; FullRowSelect := EXGRIDLib.CellSelectEnum.exRectSel; SortOnClick := EXGRIDLib.SortOnClickEnum.exNoSort; Columns.Add('Column1'); Columns.Add('Column2'); Columns.Add('Column3'); with Items do begin DefaultItem := AddItem(TObject(0)); CellValue[TObject(0),TObject(1)] := TObject(1); CellValue[TObject(0),TObject(2)] := TObject(2); DefaultItem := AddItem(TObject(3)); CellValue[TObject(0),TObject(1)] := TObject(4); CellValue[TObject(0),TObject(2)] := TObject(5); DefaultItem := AddItem(TObject(6)); CellValue[TObject(0),TObject(1)] := TObject(7); CellValue[TObject(0),TObject(2)] := TObject(8); end; EndUpdate(); end |
1194 |
Is it possible to change the color of the border
with AxGrid1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABc8IQAAYAQGKIcBiAKBQAGaAoDDMMwyQwAAxDMK8EwsACEIrjKCRShyCYZRhGcTALBIBQSHAZZKgOJIRDENg2SANACRfIUaw1DqBZwkGZoWh' + 'GKgAShIEDwSKkQBlECeJpnKaqIomJYnDLQUw0NL9HQ3JaaKqnWLBVCWEQyVzEIyjBT0EzHMqtKrjaA6NpaP4oT7LEIydKFCRJNi0bSnGqaOj6UJSURRVq3TTFcTyAC3a' + 'huOo4cpXB4SWrOd41fYNOTQACzbCsSIcPxCe6GXjiNwjPKMWhnIq+M5wXIrJyKCYUaTcejzfgdU5XWqeMoyewMXxmZqbXw/fBYRrEL5vTqNXTzSA4BEB'); Appearance := EXGRIDLib.AppearanceEnum($100ff00); ColumnAutoResize := True; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; TreeColumnIndex := -1; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; Columns.Add('Default'); with Items do begin AddItem('before item'); AddItem('item'); AddItem('after item'); end; EndUpdate(); end |
1193 |
Expandable-caption
// AnchorClick event - Occurs when an anchor element is clicked. procedure TWinForm1.AxGrid1_AnchorClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AnchorClickEvent); begin with AxGrid1 do begin OutputDebugString( e.anchorID ); end end; with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := True; TreeColumnIndex := -1; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; BackColorAlternate := Color.FromArgb(240,240,240); ShowFocusRect := False; Columns.Add('Default'); with Items do begin AddItem('before item'); h := AddItem('<solidline> <c><b>Bank Account</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAA+AAgAECMcTi4AMwAM4AjM' + 'GhEGOUVAA4AAwk8plcqihwAElg0wiUlOkOiUEgQvgcFhsKhkIhUQiUUnccj0gn0jmMagUlowAMNOpEfkMNkkmlEqrctjQmAAjAA5AA2sssHcbnkdq1Ln1QtVSjQAAEBA' + '==>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AECMwAM8DABv' + 'ABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==>`' + '50;</a><br>+ withdraw(amount: Currency)'); CellValueFormat[TObject(h),TObject(0)] := EXGRIDLib.ValueFormatEnum.exHTML; CellSingleLine[TObject(h),TObject(0)] := EXGRIDLib.CellSingleLineEnum.exCaptionWordWrap; AddItem('after item'); end; EndUpdate(); end |
1192 |
Expandable-caption
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := True; TreeColumnIndex := -1; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; BackColorAlternate := Color.FromArgb(240,240,240); ShowFocusRect := False; Columns.Add('Default'); with Items do begin AddItem('before item'); h := AddItem('<solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3'); CellValueFormat[TObject(h),TObject(0)] := EXGRIDLib.ValueFormatEnum.exHTML; CellSingleLine[TObject(h),TObject(0)] := EXGRIDLib.CellSingleLineEnum.exCaptionWordWrap; AddItem('after item'); end; EndUpdate(); end |
1191 |
Force hover-all feature
|
1190 |
Disable hover-all feature (Windows 11 or greater)
|
1189 |
Display a custom tooltip
|
1188 |
Shows the tooltip of the object moved relative to its default position
// MouseMove event - Occurs when the user moves the mouse. procedure TWinForm1.AxGrid1_MouseMoveEvent(sender: System.Object; e: AxEXGRIDLib._IGridEvents_MouseMoveEvent); begin with AxGrid1 do begin ShowToolTip('<null>','<null>',Nil,'+8','+8'); end end; with AxGrid1 do begin ColumnAutoResize := False; (Columns.Add('tootip') as EXGRIDLib.Column).ToolTip := 'this is a tooltip assigned to a column'; end |
1187 |
Delete all records
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxGrid1_ButtonClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ButtonClickEvent); begin with AxGrid1 do begin cmd := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Command')) as ADODB.Command); with cmd do begin ActiveConnection := ((AxGrid1.DataSource as ADODB.Recordset).ActiveConnection as ADODB.Connection); CommandText := 'Delete * from ORDERS'; CommandType := 1; Execute(Nil,Nil,Nil); end; (DataSource as ADODB.Recordset).Requery(Nil); end end; // Error event - Fired when an internal error occurs. procedure TWinForm1.AxGrid1_Error(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ErrorEvent); begin with AxGrid1 do begin OutputDebugString( e.description ); end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Select * From Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',1,3,Nil); end; DataSource := (rs as ADODB.Recordset); ConditionalFormats.Add('%1=12345',Nil).BackColor := $f0f0f0; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXGRIDLib.VAlignmentEnum.exTop,0]; ItemDivider[h] := 0; CellHasButton[TObject(h),TObject(0)] := True; CellValue[TObject(h),TObject(0)] := 'Requery (delete all records, using ADODB.Command)'; CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.CenterAlignment; end; EndUpdate(); end |
1186 |
How can I get a cell that shows the sum of a column of minutes in hours + minutes format
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with (Columns.Add('Minutes') as EXGRIDLib.Column) do begin SortType := EXGRIDLib.SortTypeEnum.SortNumeric; with Editor do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Numeric := EXGRIDLib.NumericEnum.exInteger; end; end; with Items do begin AddItem(TObject(10)); AddItem(TObject(20)); AddItem(TObject(30)); AddItem(TObject(40)); AddItem(TObject(50)); h := AddItem('sum(all,dir,dbl(%0))'); SelectableItem[h] := False; SortableItem[h] := False; CellValueFormat[TObject(h),TObject(0)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.RightAlignment; FormatCell[TObject(h),TObject(0)] := '''<b>HH:NN</b>: ''+ (int(value/60) lpad ''00'') + '':'' + ((value mod 60) lpad ''00'')'; end; EndUpdate(); end |
1185 |
Highlight the match once the filter is applied
// FilterChange event - Occurs when filter was changed. procedure TWinForm1.AxGrid1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin format := FormatABC('`lower(value) replace lower(''` + value + `'') with ''<bgcolor 000000><fgcolor FFFFFF>` + value + `</fgcolor></bgcolor>''`',TObject(FilterBarPromptPattern),Nil,Nil); Columns.Item[TObject(0)].FormatColumn := format; Columns.Item[TObject(1)].FormatColumn := format; Columns.Item[TObject(2)].FormatColumn := format; end end; with AxGrid1 do begin BeginUpdate(); SelBackColor := BackColor; SelForeColor := ForeColor; ColumnAutoResize := True; ContinueColumnScroll := False; MarkSearchColumn := False; SearchColumnIndex := 1; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 23; BackColorLevelHeader := BackColor; FilterBarCaption := '`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)'; FilterBarPromptVisible := Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarBackColor := BackColor; FilterBarPromptPattern := 'and'; with Columns do begin with (Add('Name') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'lower(value)'; end; with (Add('Title') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'lower(value)'; end; with (Add('City') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'lower(value)'; end; end; with Items do begin h0 := AddItem('Nancy Davolio'); CellValue[TObject(h0),TObject(1)] := 'Sales Representative'; CellValue[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Andrew Fuller'); CellValue[TObject(h0),TObject(1)] := 'Vice President, Sales'; CellValue[TObject(h0),TObject(2)] := 'Tacoma'; SelectItem[h0] := True; h0 := AddItem('Janet Leverling'); CellValue[TObject(h0),TObject(1)] := 'Sales Representative'; CellValue[TObject(h0),TObject(2)] := 'Kirkland'; h0 := AddItem('Margaret Peacock'); CellValue[TObject(h0),TObject(1)] := 'Sales Representative'; CellValue[TObject(h0),TObject(2)] := 'Redmond'; h0 := AddItem('Steven Buchanan'); CellValue[TObject(h0),TObject(1)] := 'Sales Manager'; CellValue[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Michael Suyama'); CellValue[TObject(h0),TObject(1)] := 'Sales Representative'; CellValue[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Robert King'); CellValue[TObject(h0),TObject(1)] := 'Sales Representative'; CellValue[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Laura Callahan'); CellValue[TObject(h0),TObject(1)] := 'Inside Sales Coordinator'; CellValue[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Anne Dodsworth'); CellValue[TObject(h0),TObject(1)] := 'Sales Representative'; CellValue[TObject(h0),TObject(2)] := 'London'; end; EndUpdate(); end |
1184 |
The count of filtered items includes the group-parents. How can I exclude them from count
with AxGrid1 do begin BeginUpdate(); DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; HeaderAppearance := EXGRIDLib.AppearanceEnum.Flat; HeaderHeight := 24; SortBarHeight := 28; SortBarVisible := True; AllowGroupBy := True; Columns.Add('Col 1'); Columns.Add('Col 2'); with Items do begin CellValue[TObject(AddItem('219 Smith')),TObject(1)] := 'Ignacio 1234'; CellValue[TObject(AddItem('1666 County Road 309A')),TObject(1)] := '897 Manassa'; CellValue[TObject(AddItem('38 Lone Pine')),TObject(1)] := 'Durango 11'; CellValue[TObject(AddItem('612 Jachim Street')),TObject(1)] := 'Lamar 222'; end; Layout := 'MultipleSort="C1:1"'; FilterBarCaption := '`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? leafitemcount + ` result(s)` : ``)'; FilterBarPromptVisible := Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarPromptType := Integer(EXGRIDLib.FilterPromptEnum.exFilterPromptCaseSensitive) Or Integer(EXGRIDLib.FilterPromptEnum.exFilterPromptContainsAll); FilterBarPromptPattern := '12'; FilterBarBackColor := BackColor; EndUpdate(); end |
1183 |
Is it possible to display the count of filtered items
with AxGrid1 do begin BeginUpdate(); DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; Columns.Add('Col 1'); Columns.Add('Col 2'); with Items do begin CellValue[TObject(AddItem('219 Smith')),TObject(1)] := 'Ignacio 1234'; CellValue[TObject(AddItem('1666 County Road 309A')),TObject(1)] := '897 Manassa'; CellValue[TObject(AddItem('38 Lone Pine')),TObject(1)] := 'Durango 11'; CellValue[TObject(AddItem('612 Jachim Street')),TObject(1)] := 'Lamar 222'; end; FilterBarCaption := '`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)'; FilterBarPromptVisible := Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarPromptType := Integer(EXGRIDLib.FilterPromptEnum.exFilterPromptCaseSensitive) Or Integer(EXGRIDLib.FilterPromptEnum.exFilterPromptContainsAll); FilterBarPromptPattern := '12'; FilterBarBackColor := BackColor; EndUpdate(); end |
1182 |
GroupBy code
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; ContinueColumnScroll := False; CountLockedColumns := 1; BackColorLock := Color.FromArgb(248,248,248); HasLines := EXGRIDLib.HierarchyLineEnum.exSolidLine; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exGroupLinesOutside; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); SortBarVisible := True; SingleSort := False; AllowGroupBy := True; Columns.Item[TObject(0)].Width := 128; Layout := 'MultipleSort = "C12:1 C1:2"'; EndUpdate(); end |
1181 |
ADOR, MDB (JET)
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); EndUpdate(); end |
1180 |
Editors (ImageSize = 32)
with AxGrid1 do begin BeginUpdate(); ImageSize := 32; DefaultItemHeight := 36; HeaderHeight := DefaultItemHeight; SortBarHeight := DefaultItemHeight; Font.Size := 16; FilterBarFont.Size := AxGrid1.Font.Size; ToolTipFont.Size := AxGrid1.Font.Size; Indent := 26; Images('gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqN' + 'UqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwy' + 'V21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CM' + 'Po9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask3CsIbIEQRA3shOXEEAO/GclJ9F' + 'EKrrA8FRbKMXRIlb0JxCkjS1LMswhCcvuel0cv26cSMa8Ufx+2sQwhEUoSXOCjSbLcnxjKc7sdKUVyq28NtVI71P9P7JxtQEapjQ6fzfM8zPfNE2PhIsLL63E40slk5y' + '7N89LcyU9SvMb3SdUc6VJLj5VLVLfO/PS9KzNFHUa/0XyBD0dxlS9cxhMlTRSoNXypPErWDPyfNS+MwprRNO0FD8wVVZ1AI08URwVRjtJ1WCn21QkkUrX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Q2EKEggHgRhShSZRJFYVoVm' + 'WCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVo' + 'WiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiS' + 'e41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhF' + 'CcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=='); end; (GetOcx() as EXGRIDLib.Grid).BackColorHeader := $4c6c6c6; (GetOcx() as EXGRIDLib.Grid).SelBackColor := $4000000; SelForeColor := Color.FromArgb(0,0,1); ShowFocusRect := False; set_CheckImage(EXGRIDLib.CheckStateEnum.Unchecked,16777216); set_CheckImage(EXGRIDLib.CheckStateEnum.Checked,33554432); set_CheckImage(EXGRIDLib.CheckStateEnum.PartialChecked,50331648); (Columns.Add('Editors') as EXGRIDLib.Column).Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); with Items do begin CellEditor[TObject(AddItem('(ReadOnly)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ReadOnly; CellEditor[TObject(AddItem('(EditType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.EditType; h := AddItem('Value 1'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownType; AddItem(1,'Value 1',TObject(1)); AddItem(2,'Value 2',TObject(2)); AddItem(3,'Value 3',TObject(3)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownType)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; AddItem(1,'Nancy Davolio',TObject(1)); AddItem(2,'Andrew Fuller',TObject(2)); AddItem(3,'Janet Leverling',TObject(3)); AddItem(4,'Peacock Margaret',TObject(3)); AddItem(5,'Steven Buchanan',TObject(2)); AddItem(6,'Michael Suyama',TObject(1)); AddItem(7,'Robert King',TObject(2)); AddItem(8,'Laura Callahan',TObject(3)); AddItem(9,'Anne Dodsworth',TObject(2)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - single column list)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; AddItem(1,'Nancy Davolio',TObject(1)); AddItem(2,'Andrew Fuller',TObject(2)); InsertItem(3,'Janet Leverling',TObject(3),TObject(2)); InsertItem(4,'Peacock Margaret',TObject(3),TObject(2)); InsertItem(5,'Steven Buchanan',TObject(2),TObject(2)); InsertItem(6,'Michael Suyama',TObject(1),TObject(5)); InsertItem(7,'Robert King',TObject(2),TObject(2)); InsertItem(8,'Laura Callahan',TObject(3),TObject(2)); InsertItem(9,'Anne Dodsworth',TObject(2),TObject(5)); ExpandAll(); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - single column tree)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnCaption] := 'Name¦Title¦City¦Phone'; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnWidth] := '312¦¦¦96'; AddItem(1,'Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857',TObject(1)); AddItem(2,'Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482',TObject(2)); AddItem(3,'Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412',TObject(3)); AddItem(4,'Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122',TObject(3)); AddItem(5,'Steven Buchanan¦Sales Manager¦London¦(71) 555-4848',TObject(2)); AddItem(6,'Michael Suyama¦Sales Representative¦London¦(71) 555-7773',TObject(1)); AddItem(7,'Robert King¦Sales Representative¦Kirkland¦(71) 555-5598',TObject(2)); AddItem(8,'Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189',TObject(3)); AddItem(9,'Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444',TObject(2)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - multiple columns list)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnCaption] := 'Name¦Title¦City¦Phone'; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnWidth] := '312¦¦¦96'; AddItem(1,'Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857',TObject(1)); AddItem(2,'Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482',TObject(2)); InsertItem(3,'Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412',TObject(3),TObject(2)); InsertItem(4,'Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122',TObject(3),TObject(2)); InsertItem(5,'Steven Buchanan¦Sales Manager¦London¦(71) 555-4848',TObject(2),TObject(2)); InsertItem(6,'Michael Suyama¦Sales Representative¦London¦(71) 555-7773',TObject(1),TObject(5)); InsertItem(7,'Robert King¦Sales Representative¦Kirkland¦(71) 555-5598',TObject(2),TObject(2)); InsertItem(8,'Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189',TObject(3),TObject(2)); InsertItem(9,'Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444',TObject(2),TObject(5)); ExpandAll(); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - multiple columns tree)'''; h := AddItem(TObject(100)); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.SpinType; FormatCell[TObject(h),TObject(0)] := 'value + '' (SpinType)'''; CellEditor[TObject(AddItem('(MemoType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.MemoType; h := AddItem(TObject(3)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.CheckListType; AddItem(1,'Border',TObject(1)); AddItem(2,'Single',TObject(2)); AddItem(4,'Frame',TObject(3)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (CheckListType)'''; h := AddItem('193.226.40.161'); with CellEditor[TObject(h),TObject(0)] do begin Mask := '{0,255}.{0,255}.{0,255}.{0,255}'; EditType := EXGRIDLib.EditTypeEnum.MaskType; end; FormatCell[TObject(h),TObject(0)] := 'value + '' (MaskType)'''; h := AddItem(TObject(65280)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.ColorType; Mask := '`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0'; end; FormatCell[TObject(h),TObject(0)] := 'value + '' (ColorType)'''; h := AddItem('Tahoma'); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.FontType; FormatCell[TObject(h),TObject(0)] := 'value + '' (FontType)'''; h := AddItem('gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamY' + 'yIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAw' + 'BUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQG' + '4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABG' + 'QZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCA' + 'AjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFA' + 'SoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CAJ' + 'DQNg/p4AAdoC'); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.PictureType; FormatCell[TObject(h),TObject(0)] := 'value + '' (PictureType)'''; CellEditor[TObject(AddItem('(ButtonType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ButtonType; h := AddItem(TObject(25)); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ProgressBarType; FormatCell[TObject(h),TObject(0)] := 'value + '' (ProgressBarType)'''; h := AddItem('Value 1'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.PickEditType; AddItem(1,'Value 1',TObject(1)); AddItem(2,'Value 2',TObject(2)); AddItem(3,'Value 3',TObject(3)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (PickEditType)'''; CellEditor[TObject(AddItem('(LinkEditType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.LinkEditType; with CellEditor[TObject(AddItem('(UserEditorType)')),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.UserEditorType; UserEditor('Exontrol.ComboBox',''); with UserEditorObject do begin end; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.ColorListType; Option[EXGRIDLib.EditorOptionEnum.exColorListShowName] := TObject(True); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (ColorListType)'''; CellEditor[TObject(AddItem(TObject(65280))),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ColorListType; CellEditor[TObject(AddItem('(MemoDropDownType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.MemoDropDownType; with CellEditor[TObject(AddItem(TObject(-1))),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.CheckValueType; Option[EXGRIDLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; h := AddItem(TObject(50)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.SliderType; Option[EXGRIDLib.EditorOptionEnum.exSliderWidth] := TObject(-60); Option[EXGRIDLib.EditorOptionEnum.exSliderTickFrequency] := TObject(10); Option[EXGRIDLib.EditorOptionEnum.exSliderTickStyle] := TObject(2); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (SliderType)'''; h := AddItem(TObject(100)); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.CalculatorType; FormatCell[TObject(h),TObject(0)] := 'value + '' (CalculatorType)'''; EnsureVisibleItem(h); end; EndUpdate(); end |
1179 |
Editors (ImageSize = 16, default)
with AxGrid1 do begin BeginUpdate(); ImageSize := 16; Images('gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqd' + 'SqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVtt' + 'mp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8ac' + 'vQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtTG' + 'sbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPn' + 'wD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg=='); with VisualAppearance do begin Add(4,'gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHL' + 'UXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKBU' + 'rGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3' + 'NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDsY' + 'YDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVm' + 'WCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVo' + 'WiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiS' + 'e41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhF' + 'CcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=='); end; (Columns.Add('Editors') as EXGRIDLib.Column).Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); (GetOcx() as EXGRIDLib.Grid).BackColorHeader := $4c6c6c6; with Items do begin CellEditor[TObject(AddItem('(ReadOnly)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ReadOnly; CellEditor[TObject(AddItem('(EditType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.EditType; h := AddItem('Value 1'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownType; AddItem(1,'Value 1',TObject(1)); AddItem(2,'Value 2',TObject(2)); AddItem(3,'Value 3',TObject(3)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownType)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; AddItem(1,'Nancy Davolio',TObject(1)); AddItem(2,'Andrew Fuller',TObject(2)); AddItem(3,'Janet Leverling',TObject(3)); AddItem(4,'Peacock Margaret',TObject(3)); AddItem(5,'Steven Buchanan',TObject(2)); AddItem(6,'Michael Suyama',TObject(1)); AddItem(7,'Robert King',TObject(2)); AddItem(8,'Laura Callahan',TObject(3)); AddItem(9,'Anne Dodsworth',TObject(2)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - single column list)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; AddItem(1,'Nancy Davolio',TObject(1)); AddItem(2,'Andrew Fuller',TObject(2)); InsertItem(3,'Janet Leverling',TObject(3),TObject(2)); InsertItem(4,'Peacock Margaret',TObject(3),TObject(2)); InsertItem(5,'Steven Buchanan',TObject(2),TObject(2)); InsertItem(6,'Michael Suyama',TObject(1),TObject(5)); InsertItem(7,'Robert King',TObject(2),TObject(2)); InsertItem(8,'Laura Callahan',TObject(3),TObject(2)); InsertItem(9,'Anne Dodsworth',TObject(2),TObject(5)); ExpandAll(); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - single column tree)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnCaption] := 'Name¦Title¦City¦Phone'; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnWidth] := '312¦¦¦96'; AddItem(1,'Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857',TObject(1)); AddItem(2,'Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482',TObject(2)); AddItem(3,'Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412',TObject(3)); AddItem(4,'Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122',TObject(3)); AddItem(5,'Steven Buchanan¦Sales Manager¦London¦(71) 555-4848',TObject(2)); AddItem(6,'Michael Suyama¦Sales Representative¦London¦(71) 555-7773',TObject(1)); AddItem(7,'Robert King¦Sales Representative¦Kirkland¦(71) 555-5598',TObject(2)); AddItem(8,'Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189',TObject(3)); AddItem(9,'Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444',TObject(2)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - multiple columns list)'''; h := AddItem(TObject(1)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnCaption] := 'Name¦Title¦City¦Phone'; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnWidth] := '312¦¦¦96'; AddItem(1,'Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857',TObject(1)); AddItem(2,'Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482',TObject(2)); InsertItem(3,'Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412',TObject(3),TObject(2)); InsertItem(4,'Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122',TObject(3),TObject(2)); InsertItem(5,'Steven Buchanan¦Sales Manager¦London¦(71) 555-4848',TObject(2),TObject(2)); InsertItem(6,'Michael Suyama¦Sales Representative¦London¦(71) 555-7773',TObject(1),TObject(5)); InsertItem(7,'Robert King¦Sales Representative¦Kirkland¦(71) 555-5598',TObject(2),TObject(2)); InsertItem(8,'Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189',TObject(3),TObject(2)); InsertItem(9,'Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444',TObject(2),TObject(5)); ExpandAll(); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (DropDownList - multiple columns tree)'''; h := AddItem(TObject(100)); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.SpinType; FormatCell[TObject(h),TObject(0)] := 'value + '' (SpinType)'''; CellEditor[TObject(AddItem('(MemoType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.MemoType; h := AddItem(TObject(3)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.CheckListType; AddItem(1,'Border',TObject(1)); AddItem(2,'Single',TObject(2)); AddItem(4,'Frame',TObject(3)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (CheckListType)'''; h := AddItem('193.226.40.161'); with CellEditor[TObject(h),TObject(0)] do begin Mask := '{0,255}.{0,255}.{0,255}.{0,255}'; EditType := EXGRIDLib.EditTypeEnum.MaskType; end; FormatCell[TObject(h),TObject(0)] := 'value + '' (MaskType)'''; h := AddItem(TObject(65280)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.ColorType; Mask := '`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0'; end; FormatCell[TObject(h),TObject(0)] := 'value + '' (ColorType)'''; h := AddItem('Tahoma'); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.FontType; FormatCell[TObject(h),TObject(0)] := 'value + '' (FontType)'''; h := AddItem('gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamY' + 'yIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAw' + 'BUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQG' + '4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABG' + 'QZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCA' + 'AjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFA' + 'SoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CAJ' + 'DQNg/p4AAdoC'); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.PictureType; FormatCell[TObject(h),TObject(0)] := 'value + '' (PictureType)'''; CellEditor[TObject(AddItem('(ButtonType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ButtonType; h := AddItem(TObject(25)); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ProgressBarType; FormatCell[TObject(h),TObject(0)] := 'value + '' (ProgressBarType)'''; h := AddItem('Value 1'); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.PickEditType; AddItem(1,'Value 1',TObject(1)); AddItem(2,'Value 2',TObject(2)); AddItem(3,'Value 3',TObject(3)); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (PickEditType)'''; CellEditor[TObject(AddItem('(LinkEditType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.LinkEditType; with CellEditor[TObject(AddItem('(UserEditorType)')),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.UserEditorType; UserEditor('Exontrol.ComboBox',''); with UserEditorObject do begin end; end; h := AddItem(TObject(255)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.ColorListType; Option[EXGRIDLib.EditorOptionEnum.exColorListShowName] := TObject(True); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (ColorListType)'''; CellEditor[TObject(AddItem(TObject(65280))),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.ColorListType; CellEditor[TObject(AddItem('(MemoDropDownType)')),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.MemoDropDownType; with CellEditor[TObject(AddItem(TObject(-1))),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.CheckValueType; Option[EXGRIDLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; h := AddItem(TObject(50)); with CellEditor[TObject(h),TObject(0)] do begin EditType := EXGRIDLib.EditTypeEnum.SliderType; Option[EXGRIDLib.EditorOptionEnum.exSliderWidth] := TObject(-60); Option[EXGRIDLib.EditorOptionEnum.exSliderTickFrequency] := TObject(10); Option[EXGRIDLib.EditorOptionEnum.exSliderTickStyle] := TObject(2); end; FormatCell[TObject(h),TObject(0)] := 'value + '' (SliderType)'''; h := AddItem(TObject(100)); CellEditor[TObject(h),TObject(0)].EditType := EXGRIDLib.EditTypeEnum.CalculatorType; FormatCell[TObject(h),TObject(0)] := 'value + '' (CalculatorType)'''; EnsureVisibleItem(h); end; EndUpdate(); end |
1178 |
Re-order the cell's caption, icons and images/pictures
with AxGrid1 do begin BeginUpdate(); Images('gBJJgBAICAADAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEahkZAIAEEbjMjlErlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrlTiFdib/sNjr9gs1nldlrlqtFtt0stlguNvulyh91ud1vVVvNuvt7wFHr9/vl3luEwOJouIq+Dw2KyGRyWTymVy2XzGZzUuiw+lmej0gkUaksljaAnmDc' + 'D/cEbf7w1+ufD/fEbeB028bYAO3enB6AB++4EoA4A4sb4vHjXJ4nG5vKAHA4ca6XBjTAD/Y2x/eB/jcB'); with (Columns.Add('ToLeft') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); end; with (Columns.Add('ToRight') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Def[EXGRIDLib.DefColumnEnum.exCellDrawPartsOrder] := 'caption,picture,icons,icon,check'; end; DefaultItemHeight := 32; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with Items do begin h := AddItem('Caption'); CellImage[TObject(h),TObject(0)] := 2; CellImages[TObject(h),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Object(0)]; CellHAlignment[TObject(h),TObject(1)] := EXGRIDLib.AlignmentEnum.RightAlignment; CellImage[TObject(h),TObject(1)] := CellImage[TObject(h),TObject(0)]; CellImages[TObject(h),TObject(1)] := '2,1'; CellPicture[TObject(h),TObject(1)] := (CellPicture[TObject(h),TObject(0)] as Object); h := AddItem('<b>HTML</b> <off 4>Caption'); CellValueFormat[TObject(h),TObject(0)] := EXGRIDLib.ValueFormatEnum.exHTML; CellImage[TObject(h),TObject(0)] := 2; CellImages[TObject(h),TObject(0)] := '1,2'; CellPicture[TObject(h),TObject(0)] := (AxGrid1.ExecuteTemplate('loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLsG' + 'L2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7F' + 'XI4JRrNCoIRdPyyFr0AYifDUKZ+PCufK4RReALLUbtdBHSrGTCCNKqT4MbRqUxxQx+CAAEQ2VCBbxqGaLYDZNgzFbCbLDarRCrqMYMM6cWqpHKUDqhZjnVijEoLcp0FC' + 'jVg2OYhTjN/QWk4bo4iseBsAcABIDoPA5g2HgADIkQfDCNxwkEQYnFmAIAB4OJHGcKAPioGRKFKdh2g6UB8iiZ5QkYQp3gKWhDlsWYmAARBcgCIAUniVpmiSA5AF3A4w' + 'G8P41nGWwDDAW4MAAIpSG+bRzBoGx3AeCJhh6C4ljCUJGnSRBUFKAIQA6EgIHMWBoHqYgAngHJDCALBmhCCAfHOARAScUBvAmc5zHYXxoguXQ8DEMIAH8dI8HmP4/AyQ' + 'JAEAYAoHqRByEQGJiECBAzAkKIpBYNIcikAp8kcZhDn4EBChmUoMgqHIqhiWoIgaDImgyVQImaRw/F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STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOA' + 'pDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj5' + 'Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)') as Object); CellValue[TObject(h),TObject(1)] := CellValue[TObject(h),TObject(0)]; CellValueFormat[TObject(h),TObject(1)] := EXGRIDLib.ValueFormatEnum.exHTML; CellHAlignment[TObject(h),TObject(1)] := EXGRIDLib.AlignmentEnum.RightAlignment; CellImage[TObject(h),TObject(1)] := CellImage[TObject(h),TObject(0)]; CellImages[TObject(h),TObject(1)] := '2,1'; CellPicture[TObject(h),TObject(1)] := (CellPicture[TObject(h),TObject(0)] as Object); end; EndUpdate(); end |
1177 |
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)
// AddColumn event - Fired after a new column has been added. procedure TWinForm1.AxGrid1_AddColumn(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddColumnEvent); begin // Column.Def(48) = 2 // Column.Def(49) = 2 end; with AxGrid1 do begin BeginUpdate(); ImageSize := 32; DefaultItemHeight := 36; HeaderHeight := DefaultItemHeight; SortBarHeight := DefaultItemHeight; Font.Size := 16; FilterBarFont.Size := AxGrid1.Font.Size; ToolTipFont.Size := AxGrid1.Font.Size; Indent := 26; Images('gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqN' + 'UqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz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Lib.Grid).SelBackColor := $4000000; SelForeColor := Color.FromArgb(0,0,1); set_CheckImage(EXGRIDLib.CheckStateEnum.Unchecked,16777216); set_CheckImage(EXGRIDLib.CheckStateEnum.Checked,33554432); set_CheckImage(EXGRIDLib.CheckStateEnum.PartialChecked,50331648); set_Background(EXGRIDLib.BackgroundPartEnum.exSelBackColorFilter,SelBackColor); set_Background(EXGRIDLib.BackgroundPartEnum.exSelForeColorFilter,SelForeColor); set_Background(EXGRIDLib.BackgroundPartEnum.exBackColorFilter,BackColor); set_Background(EXGRIDLib.BackgroundPartEnum.exForeColorFilter,ForeColor); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$4000000); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarActive,$4010101); set_Background(EXGRIDLib.BackgroundPartEnum.exFooterFilterBarButton,$40000ff); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; ShowFocusRect := False; SortBarVisible := True; AllowGroupBy := True; BackColorSortBar := BackColor; BackColorLevelHeader := BackColor; FilterBarDropDownHeight := 1; with (Columns.Add('Check') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; Width := 128; DisplayFilterButton := True; FilterList := EXGRIDLib.FilterListEnum.exShowCheckBox; end; with (Columns.Add('Pos') as EXGRIDLib.Column) do begin FormatColumn := '1 pos ``'; AllowSort := False; Width := 48; AllowSizing := False; Alignment := EXGRIDLib.AlignmentEnum.CenterAlignment; HeaderAlignment := EXGRIDLib.AlignmentEnum.CenterAlignment; end; with (Columns.Add('Image') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXGRIDLib.FilterListEnum.exShowExclude) Or Integer(EXGRIDLib.FilterListEnum.exShowCheckBox) Or Integer(EXGRIDLib.FilterListEnum.exSortItemsAsc); FilterType := EXGRIDLib.FilterTypeEnum.exImage; DisplayExpandButton := True; ExpandColumns := '1,2,3'; Width := 128; HeaderImage := 1; end; with (Columns.Add('Images') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Width := 196; HTMLCaption := '<img>1</img><img>2</img><img>3</img> Images'; end; Columns.Item['Pos'].Position := 3; with Items do begin hR := AddItem('Root'); ItemDivider[hR] := 0; ItemDividerLine[hR] := EXGRIDLib.DividerLineEnum.EmptyLine; h := InsertItem(hR,Nil,'Child A'); CellImage[TObject(h),TObject(2)] := 1; CellImages[TObject(h),TObject(3)] := '1,2,3'; CellValue[TObject(h),TObject(3)] := '123'; h := InsertItem(hR,Nil,'Child B'); CellState[TObject(h),TObject(0)] := 1; CellImage[TObject(h),TObject(2)] := 3; CellImages[TObject(h),TObject(3)] := '2,3,1'; CellValue[TObject(h),TObject(3)] := '231'; SelectItem[h] := True; h := InsertItem(hR,Nil,'Child C'); CellImage[TObject(h),TObject(2)] := 2; CellState[TObject(h),TObject(3)] := 1; CellValue[TObject(h),TObject(3)] := '312'; CellImages[TObject(h),TObject(3)] := '3,1,2'; ExpandItem[hR] := True; end; EndUpdate(); end |
1176 |
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)
// AddColumn event - Fired after a new column has been added. procedure TWinForm1.AxGrid1_AddColumn(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddColumnEvent); begin // Column.Def(48) = 2 // Column.Def(49) = 2 end; with AxGrid1 do begin BeginUpdate(); ImageSize := 16; Images('gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqd' + 'SqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCq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' + 'YDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVm' + 'WCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVo' + 'WiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiS' + 'e41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbhF' + 'CcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA=='); end; (GetOcx() as EXGRIDLib.Grid).BackColorHeader := $4c6c6c6; (GetOcx() as EXGRIDLib.Grid).SelBackColor := $4000000; SelForeColor := Color.FromArgb(0,0,1); set_Background(EXGRIDLib.BackgroundPartEnum.exSelBackColorFilter,SelBackColor); set_Background(EXGRIDLib.BackgroundPartEnum.exSelForeColorFilter,SelForeColor); set_Background(EXGRIDLib.BackgroundPartEnum.exBackColorFilter,BackColor); set_Background(EXGRIDLib.BackgroundPartEnum.exForeColorFilter,ForeColor); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$4000000); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarActive,$4010101); set_Background(EXGRIDLib.BackgroundPartEnum.exFooterFilterBarButton,$40000ff); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; ShowFocusRect := False; SortBarVisible := True; AllowGroupBy := True; BackColorSortBar := BackColor; BackColorLevelHeader := BackColor; FilterBarDropDownHeight := 1; with (Columns.Add('Check') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; Width := 128; DisplayFilterButton := True; FilterList := EXGRIDLib.FilterListEnum.exShowCheckBox; end; with (Columns.Add('Pos') as EXGRIDLib.Column) do begin FormatColumn := '1 pos ``'; AllowSort := False; Width := 48; AllowSizing := False; Alignment := EXGRIDLib.AlignmentEnum.CenterAlignment; HeaderAlignment := EXGRIDLib.AlignmentEnum.CenterAlignment; end; with (Columns.Add('Image') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXGRIDLib.FilterListEnum.exShowExclude) Or Integer(EXGRIDLib.FilterListEnum.exShowCheckBox) Or Integer(EXGRIDLib.FilterListEnum.exSortItemsAsc); FilterType := EXGRIDLib.FilterTypeEnum.exImage; DisplayExpandButton := True; ExpandColumns := '1,2,3'; Width := 128; HeaderImage := 1; end; with (Columns.Add('Images') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Width := 196; HTMLCaption := '<img>1</img><img>2</img><img>3</img> Images'; end; Columns.Item['Pos'].Position := 3; with Items do begin hR := AddItem('Root'); ItemDivider[hR] := 0; ItemDividerLine[hR] := EXGRIDLib.DividerLineEnum.EmptyLine; h := InsertItem(hR,Nil,'Child A'); CellImage[TObject(h),TObject(2)] := 1; CellImages[TObject(h),TObject(3)] := '1,2,3'; CellValue[TObject(h),TObject(3)] := '123'; h := InsertItem(hR,Nil,'Child B'); CellState[TObject(h),TObject(0)] := 1; CellImage[TObject(h),TObject(2)] := 3; CellImages[TObject(h),TObject(3)] := '2,3,1'; CellValue[TObject(h),TObject(3)] := '231'; SelectItem[h] := True; h := InsertItem(hR,Nil,'Child C'); CellImage[TObject(h),TObject(2)] := 2; CellState[TObject(h),TObject(3)] := 1; CellValue[TObject(h),TObject(3)] := '312'; CellImages[TObject(h),TObject(3)] := '3,1,2'; ExpandItem[hR] := True; end; EndUpdate(); end |
1175 |
The user clicks the drop-down filter, select a value and the control's list filters for the selected item(s). Is there a way for when the user then goes to the next column to add another filter and the drop down arrow is clicked for the list of values they can filter by to be limited to what is being displayed in the list due to the first filter they set
|
1174 |
Does the control display images from database (ADO)
|
1173 |
Does the control display images from database (DAO)
|
1172 |
Is it possible to set from code, a column sort without being inserted in the sortbar
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); SortBarVisible := True; Layout := 'singlesort="C1:1"'; EndUpdate(); end |
1171 |
Is it possible to view all events the control fires
// Event event - Notifies the application once the control fires an event. procedure TWinForm1.AxGrid1_Event(sender: System.Object; e: AxEXGRIDLib._IGridEvents_EventEvent); begin with AxGrid1 do begin OutputDebugString( get_EventParam(-2) ); end end; with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Tasks') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)'; Editor.EditType := EXGRIDLib.EditTypeEnum.EditType; end; HeaderVisible := True; with Items do begin h := AddItem('Project'); hChild := InsertItem(h,Nil,'Task 1'); SelectItem[hChild] := True; hChild := InsertItem(h,Nil,'Task 2'); CellState[TObject(hChild),TObject(0)] := 1; hChild := InsertItem(h,Nil,'Task 3'); CellState[TObject(hChild),TObject(0)] := 1; ExpandItem[h] := True; end; EndUpdate(); end |
1170 |
How can I find all occurences of the giving value, within a column
with AxGrid1 do begin BeginUpdate(); Columns.Add('Default'); with (Columns.Add('Pos') as EXGRIDLib.Column) do begin FormatColumn := '1 pos ''A-Z'''; Position := 0; AllowSizing := False; Width := 32; Enabled := False; end; with (Columns.Add('Index') as EXGRIDLib.Column) do begin FormatColumn := '0 index '''''; AllowSizing := False; Width := 32; Enabled := False; end; with Items do begin AddItem('A'); AddItem('A'); AddItem('A'); OutputDebugString( CellCaption[TObject(FindItem['A',TObject(0),TObject(0)]),TObject(1)] ); OutputDebugString( CellCaption[TObject(FindItem['A',TObject(0),TObject(1)]),TObject(1)] ); OutputDebugString( CellCaption[TObject(FindItem['A',TObject(0),TObject(2)]),TObject(1)] ); end; EndUpdate(); end |
1169 |
How can I prevent expanding/collapsing the child items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). procedure TWinForm1.AxGrid1_BeforeExpandItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_BeforeExpandItemEvent); begin with AxGrid1 do begin e.cancel := AxGrid1.Items.ItemParent[e.item]; end end; with AxGrid1 do begin BeginUpdate(); SingleSel := False; Columns.Add('Default'); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; with Items do begin h := AddItem('Root 1'); InsertItem(InsertItem(h,Nil,'Child 1.1'),Nil,'Child'); InsertItem(h,Nil,'Child 1.2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(InsertItem(h,Nil,'Child 2.1'),Nil,'Child'); InsertItem(h,Nil,'Child 2.2'); ExpandItem[h] := True; end; EndUpdate(); end |
1168 |
How can I display the EBN bigger or smaller (thumb)
with AxGrid1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'c:\exontrol\images\normal.ebn'); Add(10,'CP:1 0 3 0 -3'); Add(17,'CP:1 3 0 -3 0'); end; set_Background(EXGRIDLib.BackgroundPartEnum.exHSThumb,$a000000); set_Background(EXGRIDLib.BackgroundPartEnum.exVSThumb,$11000000); ScrollBars := Integer(EXGRIDLib.ScrollBarsEnum.exVScrollEmptySpace) Or Integer(EXGRIDLib.ScrollBarsEnum.exHScrollEmptySpace) Or Integer(EXGRIDLib.ScrollBarsEnum.exVScrollOnThumbRelease) Or Integer(EXGRIDLib.ScrollBarsEnum.exHScrollOnThumbRelease) Or Integer(EXGRIDLib.ScrollBarsEnum.exDisableBoth); ScrollBySingleLine := True; Columns.Add('Def'); with Items do begin AddItem(TObject(1)); AddItem(TObject(2)); AddItem(TObject(3)); end; EndUpdate(); end |
1167 |
I am using GroupBy feature to create a tree, but the top rows are aligned with the children, not indented. What could be wrong
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddGroupItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddGroupItemEvent); begin // AddBar(Item,"Progress", #12/2/2017#,#12/2/2017#) // DefineSummaryBars(Item,"", -3, "") // Chart.ItemBackColor(Item) = color with AxGrid1 do begin color := 14474460; with Items do begin ItemDivider[e.item] := -1; CellValue[TObject(e.item),TObject(1)] := TObject(CellCaption[TObject(e.item),TObject(GroupItem[e.item])]); ItemBold[e.item] := True; ItemBackColor[e.item] := color; end; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddItemEvent); begin // AddBar(Item,"Task",#12/4/2017#,#12/10/2017#) // ItemBar(Item,"", 514) = ItemToIndex(Item) with AxGrid1 do begin with Items do begin end; end end; with AxGrid1 do begin BeginUpdate(); with Columns do begin Add('C1'); Add('C2'); end; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; end; Columns.Item[TObject(0)].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |
1166 |
How can I display an item of picture type
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; ScrollBySingleLine := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; HeaderHeight := 24; (Columns.Add('Artikel') as EXGRIDLib.Column).HTMLCaption := '<u>Artikel'; (Columns.Add('Waarde') as EXGRIDLib.Column).HTMLCaption := '<u>Waarde'; set_HTMLPicture('T22128','c:\exontrol\images\zipdisk.gif'); with Items do begin h := AddItem('T22128-28)2D'); h1 := InsertItem(h,Nil,'<img>T22128:128</img>'); CellValueFormat[TObject(h1),TObject(0)] := EXGRIDLib.ValueFormatEnum.exHTML; ItemHeight[h1] := 128; h1 := InsertItem(h,Nil,'werkvoorbereiding'); CellValue[TObject(h1),TObject(1)] := '5.80'; CellBold[TObject(h1),TObject(1)] := True; CellValue[TObject(InsertItem(h1,Nil,'Type')),TObject(1)] := 'Eenvoudig'; CellValue[TObject(InsertItem(h1,Nil,'Prijs p/uur')),TObject(1)] := '60,00'; CellValue[TObject(InsertItem(h1,Nil,'Marhe')),TObject(1)] := '15,00%'; CellValue[TObject(InsertItem(h1,Nil,'Insteltijd min.')),TObject(1)] := '5,00'; CellValue[TObject(InsertItem(h1,Nil,'Aantal')),TObject(1)] := TObject(1); CellValue[TObject(InsertItem(h1,Nil,'Kostprije')),TObject(1)] := '5,00'; ExpandItem[h1] := True; h1 := InsertItem(h,Nil,'materiall'); CellValue[TObject(h1),TObject(1)] := '14.82'; CellBold[TObject(h1),TObject(1)] := True; ItemHasChildren[h1] := True; h1 := InsertItem(h,Nil,'snijden'); CellValue[TObject(h1),TObject(1)] := '3.13'; CellBold[TObject(h1),TObject(1)] := True; ItemHasChildren[h1] := True; ExpandItem[h] := True; end; EndUpdate(); end |
1165 |
Dark mode
with AxGrid1 do begin BeginUpdate(); back := 65536; fore := 16777215; VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQg' + 'mPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThd' + 'r4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA'); VisualAppearance.Add(2,'gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4bi' + 'aKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA'); VisualAppearance.Add(3,'gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5Cj' + 'mG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKaxb' + 'buaaXLhGCYBgIA=='); HeaderAppearance := EXGRIDLib.AppearanceEnum.Bump; BackColor := back; BackColorHeader := back; BackColorLevelHeader := back; BackColorSortBar := back; BackColorSortBarCaption := back; FilterBarBackColor := back; FilterBarForeColor := fore; ForeColor := fore; ForeColorHeader := fore; ForeColorSortBar := fore; SelBackColor := fore; SelForeColor := back; set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000000); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); set_Background(EXGRIDLib.BackgroundPartEnum.exToolTipAppearance,$3000000); set_Background(EXGRIDLib.BackgroundPartEnum.exToolTipBackColor,back); set_Background(EXGRIDLib.BackgroundPartEnum.exToolTipForeColor,fore); set_Background(EXGRIDLib.BackgroundPartEnum.exSelBackColorFilter,fore); set_Background(EXGRIDLib.BackgroundPartEnum.exSelForeColorFilter,back); set_Background(EXGRIDLib.BackgroundPartEnum.exBackColorFilter,back); set_Background(EXGRIDLib.BackgroundPartEnum.exForeColorFilter,fore); set_Background(EXGRIDLib.BackgroundPartEnum.exSortBarLinkColor,back); set_Background(EXGRIDLib.BackgroundPartEnum.exScrollSizeGrip,back); set_Description(EXGRIDLib.DescriptionTypeEnum.exFilterBarExclude,'<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>'); EndUpdate(); end |
1164 |
I have changed the font, but the item's height remains the same. What I am doing wrong
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; LoadXML('http://www.exontrol.net/testing.xml'); Font.Size := 22; HeaderHeight := 42; DefaultItemHeight := 36; Items.ItemHeight[0] := AxGrid1.DefaultItemHeight; EndUpdate(); end |
1163 |
How can I specify the cell's outline, border or lines around, when the cell gets selected
with AxGrid1 do begin BeginUpdate(); AttachTemplate('handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}'); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHI' + 'MQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqO' + 'p6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYn' + 'jUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWY' + 'RoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA='); Add(2,'CP:1 -4 0 0 0'); end; (GetOcx() as EXGRIDLib.Grid).SelBackColor := $2000000; SelForeColor := Color.FromArgb(0,0,1); FullRowSelect := EXGRIDLib.CellSelectEnum.exColumnSel; ShowFocusRect := False; DefaultItemHeight := 24; HeaderHeight := 24; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin CellValue[TObject(AddItem('Cell 1')),TObject(1)] := 'Cell 2'; CellValue[TObject(AddItem('Cell 3')),TObject(1)] := 'Cell 4'; end; Items.SelectPos := TObject(1); SelectColumnIndex := 1; EndUpdate(); end |
1162 |
How can I specify the cell's outline, border or lines around, when the item gets selected
with AxGrid1 do begin BeginUpdate(); AttachTemplate('handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}'); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHI' + 'MQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqO' + 'p6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYn' + 'jUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWY' + 'RoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA='); (GetOcx() as EXGRIDLib.Grid).SelBackColor := $1000000; SelForeColor := Color.FromArgb(0,0,1); ShowFocusRect := False; DefaultItemHeight := 24; HeaderHeight := 24; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin CellValue[TObject(AddItem('Cell 1')),TObject(1)] := 'Cell 2'; CellValue[TObject(AddItem('Cell 3')),TObject(1)] := 'Cell 4'; SelectPos := TObject(1); end; EndUpdate(); end |
1161 |
How can I specify the cell's outline, border or lines around
with AxGrid1 do begin BeginUpdate(); AttachTemplate('handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}'); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHI' + 'MQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqO' + 'p6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYn' + 'jUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgWY' + 'RoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA='); SelBackMode := EXGRIDLib.BackModeEnum.exTransparent; ShowFocusRect := False; DefaultItemHeight := 24; HeaderHeight := 24; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin CellValue[TObject(AddItem('Cell 1')),TObject(1)] := 'Cell 2'; h := AddItem('Cell 2'); CellValue[TObject(h),TObject(1)] := 'Cell 3'; CellBackColor[TObject(h),TObject(1)] := $1000000; end; EndUpdate(); end |
1160 |
Is it possible to highligth the match while a filter is applied
// AddColumn event - Fired after a new column has been added. procedure TWinForm1.AxGrid1_AddColumn(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddColumnEvent); begin // Column.Def(17) = 1 end; // FilterChange event - Occurs when filter was changed. procedure TWinForm1.AxGrid1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin format := FormatABC('`value replace ''` + value + `'' with ''<bgcolor 000000><fgcolor FFFFFF>` + value + `</fgcolor></bgcolor>''`',TObject(FilterBarPromptPattern),Nil,Nil); Columns.Item[TObject(0)].FormatColumn := format; Columns.Item[TObject(1)].FormatColumn := format; end end; with AxGrid1 do begin BeginUpdate(); DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; Columns.Add('Col 1'); Columns.Add('Col 2'); with Items do begin CellValue[TObject(AddItem('219 Smith')),TObject(1)] := 'Ignacio 1234'; CellValue[TObject(AddItem('1666 County Road 309A')),TObject(1)] := '897 Manassa'; CellValue[TObject(AddItem('38 Lone Pine')),TObject(1)] := 'Durango 11'; CellValue[TObject(AddItem('612 Jachim Street')),TObject(1)] := 'Lamar 222'; end; FilterBarPromptPattern := '1'; FilterBarPromptVisible := Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarPromptType := Integer(EXGRIDLib.FilterPromptEnum.exFilterPromptCaseSensitive) Or Integer(EXGRIDLib.FilterPromptEnum.exFilterPromptContainsAll); EndUpdate(); end |
1159 |
How can I replace the cell's context menu ( while edit mode is running )
// RClick event - Fired when right mouse button is clicked procedure TWinForm1.AxGrid1_RClick(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin OutputDebugString( 'Edit Mode: ' ); OutputDebugString( Editing ); with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.ContextMenu')) as EXCONTEXTMENULib.ExContextMenu) do begin Items.ToString := 'Check[chk],[sep],Item 1,Item 2,Item 3,Popup(A,B,C)'; OutputDebugString( Select(Nil,Nil,Nil) ); end; end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Flat; with (Columns.Add('Column') as EXGRIDLib.Column).Editor do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Option[EXGRIDLib.EditorOptionEnum.exEditAllowContextMenu] := TObject(False); end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); end; EndUpdate(); end |
1158 |
Is it possible to highlight the column's header once a filter is applied (sample 2)
with AxGrid1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwSA' + 'sXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbDM' + 'RwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZwX' + 'g+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGqD' + 'BoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA='); Add(2,'gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQFi' + '6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIKA' + 'T4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QBH' + 'AmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBaB' + 'ZhggZgagaYRoEwShWA6NZZAMQBAICA=='); end; set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000000); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarActive,$2000000); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderHeight := 28; BackColorHeader := Color.FromArgb(255,255,255); DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; HeaderVisible := True; with Columns do begin (Add('C1') as EXGRIDLib.Column).DisplayFilterButton := True; with (Add('C2') as EXGRIDLib.Column) do begin DisplayFilterButton := True; Filter := 'Item 2'; FilterType := EXGRIDLib.FilterTypeEnum.exFilter; end; (Add('C3') as EXGRIDLib.Column).DisplayFilterButton := True; end; with Items do begin h := AddItem('Item 1'); CellValue[TObject(h),TObject(1)] := 'Item 2'; CellValue[TObject(h),TObject(2)] := 'Item 3'; h := AddItem('Item 4'); CellValue[TObject(h),TObject(1)] := 'Item 5'; CellValue[TObject(h),TObject(2)] := 'Item 6'; end; ApplyFilter(); EndUpdate(); end |
1157 |
How can I make the expand/collapse glyphs DPI aware
with AxGrid1 do begin size := 2; BeginUpdate(); with VisualAppearance do begin Add(3,'gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQcC' + 'QAI8T5IUgARBJIDSMY6DpOIxYHgmC4DEITNLxOK0EhRHCBZrgOCAYhqEY1Ro+dhPFYjVTMdK0LRtKy7Mq2aJmOpZDxWE7dZKpO5fbxXS67cr2fp/YBed4rfa7KTlOBKc' + 'R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CgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FYF' + 'oFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAhaF' + 'KFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWRY' + 'OiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA=='); Add(1,AxGrid1.FormatABC('`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` + int(value*dpi) + ` ` + int(value*dpi)',TObject(size),Nil,Nil)); Add(2,AxGrid1.FormatABC('`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` + int(value*dpi) + ` ` + int(value*dpi)',TObject(size),Nil,Nil)); end; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exGroupLinesAtRoot; HasButtons := EXGRIDLib.ExpandButtonEnum.exCustom; set_HasButtonsCustom(False,16777216); set_HasButtonsCustom(True,33554432); Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
1156 |
Is it possible to highlight the column's header once a filter is applied (sample 1)
with AxGrid1 do begin BeginUpdate(); with VisualAppearance do begin Add(2,'gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ' + '0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YN' + 'YuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4h' + 'hKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mgb' + 'hOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWB' + 'MJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI='); Add(1,'CP:2 -8 -4 2 4'); end; set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$1fefefe); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarActive,$1010101); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderHeight := 28; BackColorHeader := Color.FromArgb(255,255,255); DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; HeaderVisible := True; with Columns do begin (Add('C1') as EXGRIDLib.Column).DisplayFilterButton := True; with (Add('C2') as EXGRIDLib.Column) do begin DisplayFilterButton := True; Filter := 'Item 2'; FilterType := EXGRIDLib.FilterTypeEnum.exFilter; end; (Add('C3') as EXGRIDLib.Column).DisplayFilterButton := True; end; with Items do begin h := AddItem('Item 1'); CellValue[TObject(h),TObject(1)] := 'Item 2'; CellValue[TObject(h),TObject(2)] := 'Item 3'; h := AddItem('Item 4'); CellValue[TObject(h),TObject(1)] := 'Item 5'; CellValue[TObject(h),TObject(2)] := 'Item 6'; end; ApplyFilter(); EndUpdate(); end |
1155 |
How do I update itemcount and matchitemcount of the FilterBarCaption after I added the item using the AddItem method
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control. procedure TWinForm1.AxGrid1_ClickEvent(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin Items.AddItem('new'); Refresh(); end end; with AxGrid1 do begin BeginUpdate(); with (Columns.Add('Item') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXGRIDLib.FilterListEnum.exShowExclude) Or Integer(EXGRIDLib.FilterListEnum.exShowFocusItem) Or Integer(EXGRIDLib.FilterListEnum.exShowCheckBox) Or Integer(EXGRIDLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXGRIDLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarCaption := '`<r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1)' + ' + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )'; FilterBarPromptVisible := Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarShowCloseOnRight) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXGRIDLib.FilterBarVisibleEnum.exFilterBarPromptVisible); EndUpdate(); end |
1154 |
I can't get values in the column properly centered. What can be the problem
with AxGrid1 do begin BeginUpdate(); TreeColumnIndex := -1; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; with (Columns.Add('Default') as EXGRIDLib.Column) do begin Alignment := EXGRIDLib.AlignmentEnum.CenterAlignment; FormatColumn := 'ltrim(rtrim(value))'; end; Items.AddItem('item 1 '); Items.AddItem(' item 2'); Items.AddItem(' item 3 '); EndUpdate(); end |
1153 |
The Edit method does not work while ReadOnly property is exLocked and the first column is hidden. Is there any fix
// DblClick event - Occurs when the user dblclk the left mouse button over an object. procedure TWinForm1.AxGrid1_DblClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_DblClickEvent); begin with AxGrid1 do begin var_ItemFromPoint := get_ItemFromPoint(-1,-1,c,hit); FocusColumnIndex := c; Edit(Nil); end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; AutoEdit := False; ReadOnly := EXGRIDLib.ReadOnlyEnum.exLocked; AutoSearch := True; (Columns.Add('') as EXGRIDLib.Column).Visible := False; with (Columns.Add('Contains') as EXGRIDLib.Column) do begin AutoSearch := EXGRIDLib.AutoSearchEnum.exContains; Editor.EditType := EXGRIDLib.EditTypeEnum.EditType; end; with Items do begin CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Tom Hanks'; CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Leonardo DiCaprio'; CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Will Smith'; CellValue[TObject(AddItem(Nil)),TObject(1)] := 'Tom Cruise'; end; EndUpdate(); end |
1152 |
How can I enable the Undo/Redo feature
with AxGrid1 do begin BeginUpdate(); AllowUndoRedo := True; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with (Columns.Add('P1') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; with (Columns.Add('P2') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; AddItem('Press CTRL + Z for Undo, and CTRL + Y for Redo'); end; EndUpdate(); end |
1151 |
The incremental search feature is no working for columns with editor assigned. What can be done
// DblClick event - Occurs when the user dblclk the left mouse button over an object. procedure TWinForm1.AxGrid1_DblClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_DblClickEvent); begin with AxGrid1 do begin Edit(Nil); end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; AutoEdit := False; AutoSearch := True; with (Columns.Add('Contains') as EXGRIDLib.Column) do begin AutoSearch := EXGRIDLib.AutoSearchEnum.exContains; Editor.EditType := EXGRIDLib.EditTypeEnum.EditType; end; with Items do begin AddItem('Tom Hanks'); AddItem('Leonardo DiCaprio'); AddItem('Will Smith'); AddItem('Tom Cruise'); end; EndUpdate(); end |
1150 |
Each item is representated by a key as string. Is it possible to have a drop down editor to display more information when using the item's key
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with (Columns.Add('Multiple-Columns Tree DropDownListType') as EXGRIDLib.Column).Editor do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; AddItem(0,'KR|Korea, Republic of',Nil); AddItem(1,'MO|Macao',Nil); AddItem(2,'SA|Saudi Arabia',Nil); AddItem(3,'EG|Egypt',Nil); AddItem(4,'GB|United Kingdom',Nil); AddItem(5,'GT|Guatemala',Nil); AddItem(6,'SR|Suriname',Nil); AddItem(7,'BM|Bermuda',Nil); end; with Items do begin AddItem('EG'); AddItem('GB'); AddItem('BM'); end; EndUpdate(); end |
1149 |
My table includes codes/keys for items, can I display a drop down editor to include more information
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with (Columns.Add('Multiple-Columns DropDownListType') as EXGRIDLib.Column).Editor do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnCaption] := 'City¦Coordinates¦State'; AddItem(0,'JV3|Jollyville¦3026N 09746W¦Texas',Nil); AddItem(1,'TMO|Altamont¦4021N 11017W¦Utah',Nil); AddItem(2,'IIM|Williamston¦4241N 08417W¦Michigan',Nil); AddItem(3,'IWN|Merrittstown¦3958N 07952W¦Pennsylvania',Nil); AddItem(4,'HOU|Houston¦2945N 09521W¦Texas',Nil); AddItem(5,'GSF|Gales Ferry¦4125N 07205W¦Connecticut',Nil); end; with Items do begin AddItem('HOU'); AddItem('IIM'); AddItem('TMO'); end; EndUpdate(); end |
1148 |
How can I display and select from a multiple-columns tree editor
with AxGrid1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with (Columns.Add('Multiple-Columns Tree DropDownListType') as EXGRIDLib.Column).Editor do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnCaption] := 'Name¦Title¦City¦Phone'; Option[EXGRIDLib.EditorOptionEnum.exDropDownColumnWidth] := '224¦¦¦96'; AddItem(1,'Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857',TObject(1)); AddItem(2,'Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482',TObject(2)); InsertItem(3,'Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412',TObject(3),TObject(2)); InsertItem(4,'Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122',TObject(3),TObject(2)); InsertItem(5,'Steven Buchanan¦Sales Manager¦London¦(71) 555-4848',TObject(2),TObject(2)); InsertItem(6,'Michael Suyama¦Sales Representative¦London¦(71) 555-7773',TObject(1),TObject(5)); InsertItem(7,'Robert King¦Sales Representative¦Kirkland¦(71) 555-5598',TObject(2),TObject(2)); InsertItem(8,'Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189',TObject(3),TObject(2)); InsertItem(9,'Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444',TObject(2),TObject(5)); ExpandAll(); end; with Items do begin AddItem(TObject(1)); AddItem(TObject(2)); AddItem(TObject(4)); end; EndUpdate(); end |
1147 |
Does you control support multiple-columns for a drop down editor
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with (Columns.Add('Multiple-Columns DropDownListType') as EXGRIDLib.Column).Editor do begin EditType := EXGRIDLib.EditTypeEnum.DropDownListType; DropDownAutoWidth := EXGRIDLib.DropDownWidthType.exDropDownEditorWidth; AddItem(0,'Jollyville¦JV3¦3026N 09746W¦TX',Nil); AddItem(1,'Altamont¦TMO¦4021N 11017W¦UT',Nil); AddItem(2,'Williamston¦IIM¦4241N 08417W¦MI',Nil); AddItem(3,'Merrittstown¦IWN¦3958N 07952W¦PA',Nil); AddItem(4,'Houston¦HOU¦2945N 09521W¦TX',Nil); AddItem(5,'Gales Ferry¦GSF¦4125N 07205W¦CT',Nil); end; with Items do begin InsertItem(0,'',TObject(1)); InsertItem(0,'',TObject(2)); InsertItem(0,'',TObject(4)); end; EndUpdate(); end |
1146 |
Is it possible to show the filterbar on top of the rows
with AxGrid1 do begin BeginUpdate(); FilterBarPromptVisible := EXGRIDLib.FilterBarVisibleEnum.exFilterBarTop; HeaderHeight := 24; FilterBarHeight := HeaderHeight; HeaderAppearance := EXGRIDLib.AppearanceEnum.Flat; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; with (Columns.Add('Column') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterType := EXGRIDLib.FilterTypeEnum.exPattern; Filter := 'B*'; end; with (Columns.Add('Index') as EXGRIDLib.Column) do begin FormatColumn := '1 index ``'; Position := 0; Width := 48; AllowSizing := False; SortType := EXGRIDLib.SortTypeEnum.SortNumeric; Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); end; with Items do begin AddItem('A.1'); AddItem('A.2'); AddItem('B.1'); AddItem('B.2'); AddItem('B.3'); AddItem('C'); end; ApplyFilter(); EndUpdate(); end |
1145 |
DragDrop (with visual effect)
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. procedure TWinForm1.AxGrid1_OLEDragDrop(sender: System.Object; e: AxEXGRIDLib._IGridEvents_OLEDragDropEvent); begin // SelectItem(InsertItem(i,, Data.GetData(1))) = True with AxGrid1 do begin i := get_ItemFromPoint(-1,-1,c,hit); with Items do begin ExpandItem[i] := True; end; end end; // OLEStartDrag event - Occurs when the OLEDrag method is called. procedure TWinForm1.AxGrid1_OLEStartDrag(sender: System.Object; e: AxEXGRIDLib._IGridEvents_OLEStartDragEvent); begin // Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1) with AxGrid1 do begin e.allowedEffects := 1; end end; with AxGrid1 do begin VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJGj' + 'uKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA=='); set_Background(EXGRIDLib.BackgroundPartEnum.exListOLEDropPosition,$1000000); set_Background(EXGRIDLib.BackgroundPartEnum.exDragDropBefore,$0); set_Background(EXGRIDLib.BackgroundPartEnum.exDragDropAfter,$ffffff); OLEDropMode := EXGRIDLib.exOLEDropModeEnum.exOLEDropManual; AutoDrag := EXGRIDLib.AutoDragEnum.exAutoDragPositionAnyOnRight; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; Indent := 16; SelBackMode := EXGRIDLib.BackModeEnum.exTransparent; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; end; OutputDebugString( 'You can:' ); OutputDebugString( 'A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)' ); OutputDebugString( 'B) right-click to re-arrange the item position inside the same control' ); OutputDebugString( 'This sample shows how you can insert the data being dropped as a child of the item being hovered.' ); end |
1144 |
DragDrop (with no visual effect, hide item while drag and drop)
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. procedure TWinForm1.AxGrid1_OLEDragDrop(sender: System.Object; e: AxEXGRIDLib._IGridEvents_OLEDragDropEvent); begin // SelectItem(InsertItem(i,, Data.GetData(1))) = True with AxGrid1 do begin i := get_ItemFromPoint(-1,-1,c,hit); with Items do begin ExpandItem[i] := True; end; end end; // OLEStartDrag event - Occurs when the OLEDrag method is called. procedure TWinForm1.AxGrid1_OLEStartDrag(sender: System.Object; e: AxEXGRIDLib._IGridEvents_OLEStartDragEvent); begin // Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1) with AxGrid1 do begin e.allowedEffects := 1; end end; with AxGrid1 do begin set_Background(EXGRIDLib.BackgroundPartEnum.exDragDropBefore,$0); set_Background(EXGRIDLib.BackgroundPartEnum.exDragDropAfter,$ffffff); OLEDropMode := EXGRIDLib.exOLEDropModeEnum.exOLEDropManual; AutoDrag := EXGRIDLib.AutoDragEnum.exAutoDragPositionAnyOnRight; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; Indent := 16; SelBackMode := EXGRIDLib.BackModeEnum.exTransparent; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; end; OutputDebugString( 'You can:' ); OutputDebugString( 'A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)' ); OutputDebugString( 'B) right-click to re-arrange the item position inside the same control' ); OutputDebugString( 'This sample shows how you can insert the data being dropped as a child of the item being hovered.' ); end |
1143 |
DragDrop
// OLEDragDrop event - Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur. procedure TWinForm1.AxGrid1_OLEDragDrop(sender: System.Object; e: AxEXGRIDLib._IGridEvents_OLEDragDropEvent); begin // SelectItem(InsertItem(i,, Data.GetData(1))) = True with AxGrid1 do begin i := get_ItemFromPoint(-1,-1,c,hit); with Items do begin ExpandItem[i] := True; end; end end; // OLEStartDrag event - Occurs when the OLEDrag method is called. procedure TWinForm1.AxGrid1_OLEStartDrag(sender: System.Object; e: AxEXGRIDLib._IGridEvents_OLEStartDragEvent); begin // Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1) with AxGrid1 do begin e.allowedEffects := 1; end end; with AxGrid1 do begin OLEDropMode := EXGRIDLib.exOLEDropModeEnum.exOLEDropManual; AutoDrag := EXGRIDLib.AutoDragEnum.exAutoDragPositionAnyOnRight; LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; Indent := 16; SelBackMode := EXGRIDLib.BackModeEnum.exTransparent; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; end; OutputDebugString( 'You can:' ); OutputDebugString( 'A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)' ); OutputDebugString( 'B) right-click to re-arrange the item position inside the same control' ); OutputDebugString( 'This sample shows how you can insert the data being dropped as a child of the item being hovered.' ); end |
1142 |
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with Columns do begin Add('Item'); with (Add('Pos') as EXGRIDLib.Column) do begin Position := 0; Width := 32; AllowSizing := False; FormatColumn := '1 index ``'; AllowSort := False; AllowDragging := False; end; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; EndUpdate(); end |
1141 |
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); with Columns do begin Add('Item'); with (Add('Pos') as EXGRIDLib.Column) do begin Position := 0; Width := 32; AllowSizing := False; FormatColumn := '1 index ``'; AllowSort := False; AllowDragging := False; end; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; EndUpdate(); end |
1140 |
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation
// FilterChange event - Occurs when filter was changed. procedure TWinForm1.AxGrid1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin Indent := AxGrid1.FormatABC('value > 0 ? 18 : 0',Items.MatchItemCount,Nil,Nil); end end; with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; Indent := 18; FilterInclude := EXGRIDLib.FilterIncludeEnum.exMatchingItemsOnly; DrawGridLines := EXGRIDLib.GridLinesEnum.exVLines; HeaderAppearance := EXGRIDLib.AppearanceEnum.Flat; with Columns do begin with (Add('Column') as EXGRIDLib.Column) do begin DisplayFilterButton := True; FilterType := EXGRIDLib.FilterTypeEnum.exFilter; FilterList := EXGRIDLib.FilterListEnum.exShowCheckBox; Filter := 'C1'; end; with (Add('Pos') as EXGRIDLib.Column) do begin FormatColumn := '1 rindex ``'; Position := 0; AllowSizing := False; AllowDragging := False; end; end; with Items do begin h := AddItem('R1'); h2 := InsertItem(h,Nil,'S'); InsertItem(h2,Nil,'C1'); InsertItem(h2,Nil,'C2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
1139 |
How can I display the total/sum/aggregate in the same column, when the user groups by a column
// AddColumn event - Fired after a new column has been added. procedure TWinForm1.AxGrid1_AddColumn(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddColumnEvent); begin with AxGrid1 do begin with e.column do begin end; end end; // AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddGroupItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddGroupItemEvent); begin with AxGrid1 do begin with Items do begin ItemDivider[e.item] := -1; ItemBackColor[e.item] := AxGrid1.BackColorSortBar; ItemHeight[e.item] := AxGrid1.HeaderHeight; CellMerge[TObject(e.item),TObject(0)] := '1,2,3,4,5,7,8,9,10,11,12'; CellValue[TObject(e.item),TObject(13)] := 'count(current,rec,1)'; CellValueFormat[TObject(e.item),TObject(13)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); CellValue[TObject(e.item),TObject(0)] := TObject(CellCaption[TObject(e.item),TObject(GroupItem[e.item])]); FormatCell[TObject(e.item),TObject(0)] := '`<b>` + value + `</b> <font ;7><off 3><fgcolor=808080>(` + %13 + `)`'; CellValue[TObject(e.item),TObject(6)] := 'sum(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),TObject(6)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); CellForeColor[TObject(e.item),TObject(6)] := $666666; end; end end; // Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exGroupLinesOutside; Indent := 12; ColumnAutoResize := False; ScrollBySingleLine := True; BackColorSortBar := Color.FromArgb(240,240,240); AutoDrag := EXGRIDLib.AutoDragEnum.exAutoDragScroll; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); SingleSort := False; SortBarVisible := True; AllowGroupBy := True; HeaderHeight := 24; with Columns do begin (Add('Count') as EXGRIDLib.Column).Visible := False; with Item['Freight'] do begin Def[EXGRIDLib.DefColumnEnum.exCellBackColor] := TObject(AxGrid1.BackColorSortBar); Def[EXGRIDLib.DefColumnEnum.exHeaderBackColor] := Def[EXGRIDLib.DefColumnEnum.exCellBackColor]; Def[EXGRIDLib.DefColumnEnum.exCellPaddingRight] := TObject(4); Def[EXGRIDLib.DefColumnEnum.exCellPaddingLeft] := TObject(4); HeaderBold := True; AllowGroupBy := False; FormatColumn := 'value format ``'; Alignment := EXGRIDLib.AlignmentEnum.RightAlignment; end; with Item[TObject(0)] do begin AllowGroupBy := False; Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); end; Item['ShipCountry'].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; end; ScrollBySingleLine := False; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exBottom] := 1; hL := LockedItem[EXGRIDLib.VAlignmentEnum.exBottom,0]; ItemHeight[hL] := 24; ItemBold[hL] := True; ItemBackColor[hL] := AxGrid1.BackColorSortBar; CellValue[TObject(hL),TObject(6)] := 'sum(all,rec,dbl(%6))'; CellValueFormat[TObject(hL),TObject(6)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); CellHAlignment[TObject(hL),TObject(6)] := EXGRIDLib.AlignmentEnum.RightAlignment; FormatCell[TObject(hL),TObject(6)] := 'value format ``'; end; EndUpdate(); end |
1138 |
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXGRIDLib.GridLinesEnum.exHLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJXh' + 'aI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA=='); with (Columns.Add('Default') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; with (Columns.Add('Position') as EXGRIDLib.Column) do begin FormatColumn := '((1 rindex ``) contains `.`) = 0'; Visible := False; end; with ConditionalFormats.Add('%C1',Nil) do begin BackColor := $1e0e0e0; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); InsertItem(h,Nil,'Child 3'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); h := AddItem('Root 3'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; EndUpdate(); end |
1137 |
I can not center or align the cell's caption and icon, when it displays the hierarchy
with AxGrid1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Tasks') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); end; HeaderVisible := True; with Items do begin h := AddItem('Project'); hChild := InsertItem(h,Nil,'<img>1</img> Task (left)'); hChild := InsertItem(h,Nil,'<c><img>2</img> Task (center)'); hChild := InsertItem(h,Nil,'<r>Task (right) <img>3</img>'); ExpandItem[h] := True; end; EndUpdate(); end |
1136 |
How do I mask for float/integer number
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := True; (Columns.Add('Type') as EXGRIDLib.Column).Width := 32; Columns.Add('Editor'); with Items do begin h := AddItem('Integer'); CellValue[TObject(h),TObject(1)] := '12'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Numeric := EXGRIDLib.NumericEnum.exInteger; end; h := AddItem('Integer (mask, group)'); CellValue[TObject(h),TObject(1)] := '10002'; FormatCell[TObject(h),TObject(1)] := 'value format `0||`'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.MaskType; Mask := ';;;float,digits=0,invalid=empty,warning=invalid character'; end; h := AddItem('Integer (mask, no group)'); CellValue[TObject(h),TObject(1)] := '10002'; FormatCell[TObject(h),TObject(1)] := 'value format `0|0|`'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.MaskType; Mask := ';;;float,digits=0,grouping=,invalid=empty,warning=invalid character'; end; h := AddItem('Float'); CellValue[TObject(h),TObject(1)] := '+12.34E+2'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Numeric := EXGRIDLib.NumericEnum.exFloat; end; h := AddItem('Float (no signs)'); CellValue[TObject(h),TObject(1)] := '12.34E-2'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Numeric := Integer(EXGRIDLib.NumericEnum.exDisableSigns) Or Integer(EXGRIDLib.NumericEnum.exFloat); end; h := AddItem('Float-Integer'); CellValue[TObject(h),TObject(1)] := '+12.34'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Numeric := EXGRIDLib.NumericEnum.exFloatInteger; end; h := AddItem('Float-Integer (no signs)'); CellValue[TObject(h),TObject(1)] := '12.34'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.EditType; Numeric := Integer(EXGRIDLib.NumericEnum.exDisableSigns) Or Integer(EXGRIDLib.NumericEnum.exFloatInteger); end; h := AddItem('Float (mask,group)'); CellValue[TObject(h),TObject(1)] := '10002.34'; FormatCell[TObject(h),TObject(1)] := 'value format `2`'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.MaskType; Mask := ';;;float,invalid=empty,warning=invalid character'; end; h := AddItem('Float (mask, no group)'); CellValue[TObject(h),TObject(1)] := '10002.34'; FormatCell[TObject(h),TObject(1)] := 'value format `2|0|`'; with CellEditor[TObject(h),TObject(1)] do begin EditType := EXGRIDLib.EditTypeEnum.MaskType; Mask := ';;;float,grouping=,invalid=empty,warning=invalid character'; end; end; EndUpdate(); end |
1135 |
How do I set an extra data for each item
// MouseMove event - Occurs when the user moves the mouse. procedure TWinForm1.AxGrid1_MouseMoveEvent(sender: System.Object; e: AxEXGRIDLib._IGridEvents_MouseMoveEvent); begin with AxGrid1 do begin i := get_ItemFromPoint(-1,-1,c,hit); OutputDebugString( i ); OutputDebugString( Items.ItemData[i] ); end end; with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := True; Columns.Add('Default'); with Items do begin ItemData[AddItem('method 1')] := 'your extra data of method 1'; InsertItem(0,'your extra data of method 2','method 2'); end; with Items do begin DefaultItem := AddItem('method 3'); ItemData[0] := 'your extra data of method 3'; end; EndUpdate(); end |
1134 |
I do not like to specify the item padding for every column I add. The question is how can I do it automatically
with AxGrid1 do begin BeginUpdate(); AttachTemplate('handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}'); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesVSolid; with Columns do begin Add('Item'); with (Add('Pos') as EXGRIDLib.Column) do begin Position := 0; Width := 32; AllowSizing := False; FormatColumn := '1 index ``'; end; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; EndUpdate(); end |
1133 |
How can I change the Exclude field in the drop down filter window
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; set_HTMLPicture('exclude','gCJKBOI4NBQaBQAhQNJJIIhShQACERCAEAcRdrdcUQhQDOZCJJUBEjbbhJ7giIJOBILJziJvl4BeKibhDiIZOhFLB0KZvMx0O5hORlAB3owuNJuNZzMZhOBlFxvORnTb' + 'uHgaiIeKBMKhFf9fDIcEoPCAVEAlGI4HhBBYMCARCQVGg4IhVMCAWC2XY1Q7WJ8RBB0KROKYAYDBbzicjndD6fA/VsRHRJIhBkRbMYIGwGAQjA2fRYOEBoYjBFBx1ATC' + 'gCGQ8M7OTjSaJMDRDKIwYu5DrIMBgSAADKJTqhBhyRApAA3FAucZPPilokRJJFJxEVxCMCCgIA=='); set_Description(EXGRIDLib.DescriptionTypeEnum.exFilterBarExclude,'<img>exclude</img>'); with (Columns.Add('Items') as EXGRIDLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXGRIDLib.FilterListEnum.exShowExclude) Or Integer(EXGRIDLib.FilterListEnum.exShowFocusItem) Or Integer(EXGRIDLib.FilterListEnum.exShowCheckBox); end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); end; EndUpdate(); end |
1132 |
How can I change the Exclude field in the drop down filter window
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; set_Description(EXGRIDLib.DescriptionTypeEnum.exFilterBarExclude,'<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>'); with (Columns.Add('Items') as EXGRIDLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXGRIDLib.FilterListEnum.exShowExclude) Or Integer(EXGRIDLib.FilterListEnum.exShowFocusItem) Or Integer(EXGRIDLib.FilterListEnum.exShowCheckBox); end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); end; EndUpdate(); end |
1131 |
The grid lines looks different then before. What should I do
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; GridLineStyle := EXGRIDLib.GridLinesStyleEnum.exGridLinesGeometric; with (Columns.Add('Tasks') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; HeaderVisible := True; with Items do begin h := AddItem('Project'); hChild := InsertItem(h,Nil,'Task 1'); SelectItem[hChild] := True; hChild := InsertItem(h,Nil,'Task 2'); CellState[TObject(hChild),TObject(0)] := 1; hChild := InsertItem(h,Nil,'Task 3'); CellState[TObject(hChild),TObject(0)] := 1; ExpandItem[h] := True; end; EndUpdate(); end |
1130 |
Can I sort the column by check-state
with AxGrid1 do begin BeginUpdate(); with (Columns.Add('Check') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); SortType := EXGRIDLib.SortTypeEnum.exSortByState; end; with Items do begin AddItem(Nil); CellState[TObject(AddItem(Nil)),TObject(0)] := 1; CellState[TObject(AddItem(Nil)),TObject(0)] := 1; AddItem(Nil); end; Columns.Item[TObject(0)].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |
1129 |
Can I sort the column by image
with AxGrid1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Image') as EXGRIDLib.Column) do begin SortType := EXGRIDLib.SortTypeEnum.exSortByImage; end; with Items do begin CellImage[TObject(AddItem(Nil)),TObject(0)] := 3; AddItem(Nil); CellImage[TObject(AddItem(Nil)),TObject(0)] := 1; CellImage[TObject(AddItem(Nil)),TObject(0)] := 2; end; Columns.Item[TObject(0)].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |
1128 |
Can I sort the column by value(numeric)
with AxGrid1 do begin BeginUpdate(); with (Columns.Add('Value') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := '`<fgcolor=808080><off 4><font ;6> ` + (1 index ``) + ` </font></off></fgcolor>` + value'; SortType := Integer(EXGRIDLib.SortTypeEnum.exSortByValue) Or Integer(EXGRIDLib.SortTypeEnum.SortNumeric); end; with Items do begin AddItem('1'); AddItem('10'); AddItem('2'); AddItem('20'); end; Columns.Item[TObject(0)].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |
1127 |
Can I sort a column by cell's state (checked, unchecked) rather than caption
with AxGrid1 do begin BeginUpdate(); with (Columns.Add('Check') as EXGRIDLib.Column) do begin with Editor do begin EditType := EXGRIDLib.EditTypeEnum.CheckValueType; Option[EXGRIDLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; SortType := EXGRIDLib.SortTypeEnum.SortNumeric; end; with Items do begin AddItem(TObject(True)); AddItem(TObject(False)); AddItem(TObject(False)); AddItem(TObject(True)); end; Columns.Item[TObject(0)].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |
1126 |
How do I get the item's auto-number, when using FormatColumn property, as CellValue gets empty
// SelectionChanged event - Fired after a new item has been selected. procedure TWinForm1.AxGrid1_SelectionChanged(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin with Items do begin OutputDebugString( 'pos: ' ); OutputDebugString( CellCaption[TObject(FocusItem),TObject(1)] ); OutputDebugString( 'rpos(1): ' ); OutputDebugString( CellCaption[TObject(FocusItem),TObject(2)] ); OutputDebugString( 'rpos(2): ' ); OutputDebugString( CellCaption[TObject(FocusItem),TObject(3)] ); OutputDebugString( 'apos: ' ); OutputDebugString( CellCaption[TObject(FocusItem),TObject(4)] ); OutputDebugString( 'index: ' ); OutputDebugString( CellCaption[TObject(FocusItem),TObject(5)] ); end; end end; with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with Columns do begin Add('Items'); with (Add('pos') as EXGRIDLib.Column) do begin FormatColumn := '1 pos ``'; Position := 0; Width := 48; AllowSizing := False; end; with (Add('rpos(1)') as EXGRIDLib.Column) do begin FormatColumn := '1 rpos ``'; Position := 1; Width := 48; AllowSizing := False; end; with (Add('rpos(2)') as EXGRIDLib.Column) do begin FormatColumn := '1 rpos `.||A-Z`'; Position := 2; Width := 48; AllowSizing := False; end; with (Add('apos') as EXGRIDLib.Column) do begin FormatColumn := '1 apos ``'; Position := 3; Width := 48; AllowSizing := False; end; with (Add('index') as EXGRIDLib.Column) do begin FormatColumn := '1 index ``'; Position := 4; Width := 48; AllowSizing := False; end; end; with Items do begin h := AddItem('Item 1'); InsertItem(h,Nil,'Child 1'); hSel := InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; AddItem('Item 2'); AddItem('Item 3'); end; EndUpdate(); Items.SelectItem[hSel] := True; end |
1125 |
How can I display UNICODE characters
with AxGrid1 do begin BeginUpdate(); with Font do begin Name := 'Arial Unicode'; Size := 22; end; HeaderVisible := False; DefaultItemHeight := 48; (Columns.Add('') as EXGRIDLib.Column).Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); with Items do begin AddItem('Ӓӓ'); AddItem('ᦜᦝ;ᦞ'); AddItem('ɮɭ;ɯ'); AddItem('勳勴勵勶'); FormatCell[TObject(AddItem(TObject(AxGrid1.Version))),TObject(0)] := '(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` '; end; EndUpdate(); end |
1124 |
How do I display the position of the item with 0-padding
with AxGrid1 do begin BeginUpdate(); (Columns.Add('Items') as EXGRIDLib.Column).FormatColumn := '((1 apos ``) lpad `00`) + `. ` + value'; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); AddItem('Item D'); end; EndUpdate(); end |
1123 |
Can't get the +/- to be displayed on a divider item. What else can I do
with AxGrid1 do begin BeginUpdate(); LinesAtRoot := EXGRIDLib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; TreeColumnIndex := 0; MarkSearchColumn := False; FullRowSelect := EXGRIDLib.CellSelectEnum.exColumnSel; HeaderAppearance := EXGRIDLib.AppearanceEnum($fffffff8 Or Integer(EXGRIDLib.AppearanceEnum.Bump) Or Integer(EXGRIDLib.AppearanceEnum.Sunken)); with Columns do begin (Add('C1') as EXGRIDLib.Column).Width := 32; (Add('C2') as EXGRIDLib.Column).FormatColumn := '1 index ``'; end; with Items do begin h := AddItem('Cell 1'); CellSingleLine[TObject(h),TObject(1)] := EXGRIDLib.CellSingleLineEnum.exCaptionWordWrap; h := AddItem('This is bit of text merges all cells in the item (divider shows no +/-)'); ItemDivider[h] := 0; ItemBackColor[h] := $f0f0f0; ItemDividerLine[h] := EXGRIDLib.DividerLineEnum.EmptyLine; CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.CenterAlignment; InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Cell 3'); h := AddItem('This is bit of text merges all cells in the item (merge shows +/-)'); ItemBackColor[h] := $f0f0f0; CellMerge[TObject(h),TObject(0)] := TObject(1); InsertItem(h,Nil,'Child 3'); InsertItem(h,Nil,'Child 4'); ExpandItem[h] := True; end; EndUpdate(); end |
1122 |
How can I define a column of button type
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxGrid1_ButtonClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ButtonClickEvent); begin with AxGrid1 do begin with Items do begin OutputDebugString( CellValue[TObject(e.item),TObject(e.colIndex)] ); end; end end; with AxGrid1 do begin BeginUpdate(); with (Columns.Add('Button') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellHasButton] := TObject(True); Def[EXGRIDLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(False); FormatColumn := '``'; AllowSizing := False; Width := 48; end; (Columns.Add('Second') as EXGRIDLib.Column).FormatColumn := '` Item ` + 1 index ``'; with Items do begin AddItem('Button 1'); AddItem('Button 2'); AddItem('Button 3 '); end; EndUpdate(); end |
1121 |
Is it possible to configure different colour/icon when there is a active filter
// FilterChange event - Occurs when filter was changed. procedure TWinForm1.AxGrid1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxGrid1 do begin set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,FormatABC('value = 0 ? 0x1000001 : 0x10000FF ',TObject(Columns.Item[TObject(0)].FilterType),Nil,Nil)); end end; with AxGrid1 do begin BeginUpdate(); with VisualAppearance do begin RenderType := -16777216; Add(1,'gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQg' + 'mPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThd' + 'r4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA'); end; DrawGridLines := EXGRIDLib.GridLinesEnum.exAllLines; ShowFocusRect := False; set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000001); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; BackColorHeader := Color.FromArgb(255,255,255); HeaderVisible := True; with (Columns.Add('Filter') as EXGRIDLib.Column) do begin DisplayFilterButton := True; AllowSort := False; AllowDragging := False; FilterList := EXGRIDLib.FilterListEnum.exShowCheckBox; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; with Columns.Item[TObject(0)] do begin Filter := 'Item B'; FilterType := EXGRIDLib.FilterTypeEnum.exFilter; end; ApplyFilter(); EndUpdate(); end |
1120 |
How can I display the type of the value the column display
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; with (Columns.Add('Values') as EXGRIDLib.Column) do begin Def[EXGRIDLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'value + ` <off 4><fgcolor=808080>type(` + type(%0) + `)`'; end; with Items do begin AddItem(Nil); AddItem(TObject(-1)); AddItem('string'); AddItem('1/1/2001'); AddItem(TObject(2)); AddItem(TObject(True)); AddItem(TObject(12.34)); end; EndUpdate(); end |
1119 |
I want to create a conditional format for a column, verifying that the value of the cell is numeric, how can I do
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; Columns.Add('Values'); with ConditionalFormats.Add('type(%0) in (2,3,4,5,18,19,20,21)',Nil) do begin ForeColor := $ff; Bold := True; end; ConditionalFormats.Add('type(%0) = 11',Nil).ForeColor := $ff00; ConditionalFormats.Add('type(%0) = 7',Nil).ForeColor := $ff0000; ConditionalFormats.Add('type(%0) in (0,1)',Nil).BackColor := $f0f0f0; with Items do begin AddItem(Nil); AddItem(TObject(-1)); AddItem('string'); AddItem('1/1/2001'); AddItem(TObject(2)); AddItem(TObject(True)); AddItem(TObject(12.34)); end; EndUpdate(); end |
1118 |
How can I assign a computed value on a different column based on other columns
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin FreezeEvents(True); with Items do begin CellValue[TObject(e.item),TObject(1)] := AxGrid1.FormatABC('int(255*sin(value/2))',TObject(e.newValue),Nil,Nil); CellValue[TObject(e.item),TObject(2)] := AxGrid1.FormatABC('int(255*cos(value/2))',TObject(e.newValue),Nil,Nil); end; FreezeEvents(False); end end; with AxGrid1 do begin BeginUpdate(); SelBackMode := EXGRIDLib.BackModeEnum.exTransparent; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; with (Columns.Add('Value') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Width := 64; AllowSizing := False; end; (Columns.Add('Assign A') as EXGRIDLib.Column).Def[EXGRIDLib.DefColumnEnum.exCellBackColor] := TObject(16448250); (Columns.Add('Assign B') as EXGRIDLib.Column).Def[EXGRIDLib.DefColumnEnum.exCellBackColor] := TObject(16448250); var_Column := (Columns.Add('Computed') as EXGRIDLib.Column); with var_Column do begin Def[EXGRIDLib.DefColumnEnum.exCellBackColor] := TObject(16448250); ComputedField := '%1 + %2'; FormatColumn := 'value format ``'; Alignment := EXGRIDLib.AlignmentEnum.RightAlignment; HeaderAlignment := Alignment; end; ConditionalFormats.Add('%3 >= 0',Nil).Bold := True; with Items do begin AddItem(TObject(1989)); AddItem(TObject(2001)); AddItem(TObject(2017)); AddItem(TObject(2018)); AddItem(TObject(2019)); end; EndUpdate(); end |
1117 |
How can I get computed a value on a different column
with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; with (Columns.Add('Year') as EXGRIDLib.Column) do begin Editor.EditType := EXGRIDLib.EditTypeEnum.SpinType; Width := 64; AllowSizing := False; end; (Columns.Add('Easter') as EXGRIDLib.Column).FormatColumn := 'date(dateS(''3/1/'' + %0) + ((1:=(((255 - 11 * (%0 mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((%0 + int(%0 / 4)) +' + ' =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))'; with Items do begin AddItem(TObject(1989)); AddItem(TObject(2001)); AddItem(TObject(2017)); AddItem(TObject(2018)); AddItem(TObject(2019)); end; EndUpdate(); end |
1116 |
How can I prevent applying ConditionalFormats on a specified cell, for instance I am displaying a Total field, and I will like to have formatted in a different way (method 2)
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin BeginUpdate(); with ConditionalFormats.Add('(%0 >= 0)',Nil) do begin Expression := '(0=type(%CD0)) and (%0 >= 0)'; Bold := True; ForeColor := $ff; OutputDebugString( 'ConditionalFormat.Valid' ); OutputDebugString( Valid ); end; with (Columns.Add('Numbers') as EXGRIDLib.Column) do begin with Editor do begin Numeric := EXGRIDLib.NumericEnum.exInteger; EditType := EXGRIDLib.EditTypeEnum.SpinType; end; SortType := EXGRIDLib.SortTypeEnum.SortNumeric; end; with Items do begin AddItem(TObject(100)); AddItem(TObject(-25)); AddItem(TObject(31)); AddItem(TObject(-48)); end; with Items do begin h := AddItem('sum(all,dir,dbl(%0))'); SelectableItem[h] := False; SortableItem[h] := False; ItemBackColor[h] := $f0f0f0; CellData[TObject(h),TObject(0)] := 'total'; CellValueFormat[TObject(h),TObject(0)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); FormatCell[TObject(h),TObject(0)] := '''Total: <b><fgcolor=0000FF>''+(value format ``)'; end; EndUpdate(); end |
1115 |
How can I prevent applying ConditionalFormats on a specified cell, for instance I am displaying a Total field, and I will like to have formatted in a different way (method 1)
// Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin BeginUpdate(); with ConditionalFormats.Add('%0 >= 0',Nil) do begin Bold := True; ForeColor := $ff; ApplyTo := EXGRIDLib.FormatApplyToEnum.exFormatToColumns; end; with (Columns.Add('Numbers') as EXGRIDLib.Column) do begin with Editor do begin Numeric := EXGRIDLib.NumericEnum.exInteger; EditType := EXGRIDLib.EditTypeEnum.SpinType; end; SortType := EXGRIDLib.SortTypeEnum.SortNumeric; end; (Columns.Add('Total') as EXGRIDLib.Column).Visible := False; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exBottom] := 1; h := LockedItem[EXGRIDLib.VAlignmentEnum.exBottom,0]; ItemDivider[h] := 1; ItemDividerLine[h] := EXGRIDLib.DividerLineEnum.EmptyLine; ItemBackColor[h] := $f0f0f0; CellValue[TObject(h),TObject(1)] := 'sum(all,dir,dbl(%0))'; CellValueFormat[TObject(h),TObject(1)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); CellHAlignment[TObject(h),TObject(1)] := EXGRIDLib.AlignmentEnum.RightAlignment; FormatCell[TObject(h),TObject(1)] := '''Total: <b><fgcolor=0000FF>''+(value format ``)'; end; with Items do begin AddItem(TObject(100)); AddItem(TObject(-25)); AddItem(TObject(31)); AddItem(TObject(-48)); end; EndUpdate(); end |
1114 |
ADODB Requery sample
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxGrid1_ButtonClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ButtonClickEvent); begin with AxGrid1 do begin cmd := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Command')) as ADODB.Command); with cmd do begin ActiveConnection := ((AxGrid1.DataSource as ADODB.Recordset).ActiveConnection as ADODB.Connection); CommandText := 'INSERT INTO Orders (EmployeeID) VALUES(12345)'; CommandType := 1; Execute(Nil,Nil,Nil); end; (DataSource as ADODB.Recordset).Requery(Nil); end end; // Error event - Fired when an internal error occurs. procedure TWinForm1.AxGrid1_Error(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ErrorEvent); begin with AxGrid1 do begin OutputDebugString( e.description ); end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Select * From Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',1,3,Nil); end; DataSource := (rs as ADODB.Recordset); ConditionalFormats.Add('%1=12345',Nil).BackColor := $f0f0f0; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXGRIDLib.VAlignmentEnum.exTop,0]; ItemDivider[h] := 0; CellHasButton[TObject(h),TObject(0)] := True; CellValue[TObject(h),TObject(0)] := 'Requery (add a new record, using ADODB.Command)'; CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.CenterAlignment; end; EndUpdate(); end |
1113 |
I am using DetectAddNew property, but no new items is added when AddNew is performed
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxGrid1_ButtonClick(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ButtonClickEvent); begin with AxGrid1 do begin with (DataSource as ADODB.Recordset) do begin AddNew('EmployeeID',TObject(123)); Update(Nil,Nil); end; end end; // Error event - Fired when an internal error occurs. procedure TWinForm1.AxGrid1_Error(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ErrorEvent); begin with AxGrid1 do begin OutputDebugString( e.description ); end end; with AxGrid1 do begin BeginUpdate(); HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',1,3,Nil); end; DataSource := (rs as ADODB.Recordset); with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXGRIDLib.VAlignmentEnum.exTop,0]; ItemDivider[h] := 0; CellHasButton[TObject(h),TObject(0)] := True; CellValue[TObject(h),TObject(0)] := 'AddNew'; CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.CenterAlignment; end; DetectAddNew := True; DetectDelete := True; EndUpdate(); end |
1112 |
I am skinning the control's header-bar, but the background of the header-bar is shown on each item in the filter-bar drop down panel. What can I do
with AxGrid1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABFgDg6AADACAxRDgMQBQKAAzQFAYcBqGqGAAGQZxYgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHL' + 'UXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQGhsCYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU8lORLUi+M4zSBPcZVTRtGShPDBK' + 'TjMKKYgkG4lVpRNa0PC1GTzQ6mazkKQLRADDIDVbAeL3LiMBy9LyLLItQALByua5mWhbcZyBCOPgBTrRb5zO58FjuTK7YLjMB7NrUNYtFaUMy2OpOCADIaecTNcaWLxP' + 'F2MY1HWYxVj2Jw3DuRJonKYBgggSRAlIYw6B0ThGFgPAkFUDAhBMfZRiGNAkFECZnm4YQdneJwqnsSQrGAAhWAIJBJBIQgFCQIBiEIAglgqYo0i4V4MEgRI9gSToYFSb' + '4Fk6Y4+BmBZhFOJgTC8TBogQAArgqco4muCZOkOM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zYFoABTuJzPMSyIhxXD8cweaZvSpLExVYK9BY3PbKMgxC77QgTIpDaQMNS6PjtF43PAALLFUaNYzoOKzABMHATBIXAYJCwIIR5G7ID4BbQcCQAHL9DBa' + 'EEIAEEISgGhMGZQmocgymmIRQkIEQ2BcGgbEIRQci8XaMBqTRVgSAZHG+S5pnOep+D6f4vjec5zn0fpfmgBgAH6TRoBYBoAh+eAmAiAgPFgNArgOQpIESdoEmCOAOAqB' + 'YfFGAgaEaBgYHYFYFmIB5UiGCJUgKCgmgeYoHk4BgCmKRQiCwApgHgYgyH8B54lQU4NkMeJlBoDgjkiXBTg0R54iYIR+koeQVBoKpkgkChKhEJBkF4SFEjkDgJhFQoeE' + 'mDJlBeehUhWJQJGIXoICWOQ6FeFIlhkfhlDsSJpiQVoamaSY2G6G5nAmRhpCOH5pkwVYdmeCZmHqHpnkmdhzhmaAIFiax8AABAEICA=='); end; (GetOcx() as EXGRIDLib.Grid).BackColorHeader := $1000000; ForeColorHeader := Color.FromArgb(128,128,128); set_Background(EXGRIDLib.BackgroundPartEnum.exHeaderFilterBarButton,$2000000); set_Background(EXGRIDLib.BackgroundPartEnum.exBackColorFilter,$ffffff); set_Background(EXGRIDLib.BackgroundPartEnum.exForeColorFilter,$10000); set_Background(EXGRIDLib.BackgroundPartEnum.exSelBackColorFilter,$1ff8000); set_Background(EXGRIDLib.BackgroundPartEnum.exSelForeColorFilter,$f0f0f0); set_Background(EXGRIDLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderHeight := 24; BackColorLevelHeader := BackColor; with (Columns.Add('Filter') as EXGRIDLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXGRIDLib.FilterListEnum.exShowExclude) Or Integer(EXGRIDLib.FilterListEnum.exShowFocusItem) Or Integer(EXGRIDLib.FilterListEnum.exShowCheckBox) Or Integer(EXGRIDLib.FilterListEnum.exSortItemsAsc); Def[EXGRIDLib.DefColumnEnum.exHeaderPaddingLeft] := TObject(2); Def[EXGRIDLib.DefColumnEnum.exHeaderPaddingRight] := TObject(2); end; with Items do begin AddItem('A'); AddItem('B'); AddItem('C'); AddItem('D'); end; EndUpdate(); end |
1111 |
How can I change the font for entire column (method 3)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddItemEvent); begin with AxGrid1 do begin with Items do begin CellFont[TObject(e.item),TObject(1)] := (AxGrid1.Columns.Item[TObject(1)].Data as stdole.StdFont); CellBold[TObject(e.item),TObject(1)] := True; CellForeColor[TObject(e.item),TObject(1)] := $ff; end; end end; with AxGrid1 do begin BeginUpdate(); HeaderHeight := 24; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; Columns.Add('C1'); with (Columns.Add('C2') as EXGRIDLib.Column) do begin HTMLCaption := '<b><font Tahoma;14>C2'; f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont); with f do begin Name := 'Tahoma'; Size := 11; end; Data := (f as stdole.StdFont); end; with Items do begin CellValue[TObject(AddItem(TObject(10))),TObject(1)] := TObject(11); CellValue[TObject(AddItem(TObject(12))),TObject(1)] := TObject(13); end; EndUpdate(); end |
1110 |
How can I change the font for entire column (method 2)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddItemEvent); begin with AxGrid1 do begin with Items do begin f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont); with f do begin Name := 'Tahoma'; Size := 11; end; CellFont[TObject(e.item),TObject(1)] := (f as stdole.StdFont); CellBold[TObject(e.item),TObject(1)] := True; CellForeColor[TObject(e.item),TObject(1)] := $ff; end; end end; with AxGrid1 do begin BeginUpdate(); HeaderHeight := 24; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; Columns.Add('C1'); (Columns.Add('C2') as EXGRIDLib.Column).HTMLCaption := '<b><font Tahoma;14>C2'; with Items do begin CellValue[TObject(AddItem(TObject(10))),TObject(1)] := TObject(11); CellValue[TObject(AddItem(TObject(12))),TObject(1)] := TObject(13); end; EndUpdate(); end |
1109 |
How can I change the font for entire column (method 1)
with AxGrid1 do begin BeginUpdate(); with ConditionalFormats.Add('1',Nil) do begin Bold := True; ForeColor := $ff; f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont); with f do begin Name := 'Tahoma'; Size := 11; end; Font := (f as stdole.StdFont); ApplyTo := EXGRIDLib.FormatApplyToEnum($1); end; HeaderHeight := 24; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; Columns.Add('C1'); (Columns.Add('C2') as EXGRIDLib.Column).HTMLCaption := '<b><font Tahoma;14>C2'; with Items do begin CellValue[TObject(AddItem(TObject(10))),TObject(1)] := TObject(11); CellValue[TObject(AddItem(TObject(12))),TObject(1)] := TObject(13); end; EndUpdate(); end |
1108 |
I am using ExComboBox as an user editor, how can I display a different column
// UserEditorClose event - Fired the user editor is about to be opened. procedure TWinForm1.AxGrid1_UserEditorClose(sender: System.Object; e: AxEXGRIDLib._IGridEvents_UserEditorCloseEvent); begin // Items.CellValue(Item,ColIndex) = Object.Select("OrderID") end; // UserEditorOleEvent event - Occurs when an user editor fires an event. procedure TWinForm1.AxGrid1_UserEditorOleEvent(sender: System.Object; e: AxEXGRIDLib._IGridEvents_UserEditorOleEventEvent); begin with AxGrid1 do begin OutputDebugString( e.ev ); end end; // UserEditorOpen event - Occurs when an user editor is about to be opened. procedure TWinForm1.AxGrid1_UserEditorOpen(sender: System.Object; e: AxEXGRIDLib._IGridEvents_UserEditorOpenEvent); begin // Object.Select("OrderID") = Me.Items.CellValue(Item,ColIndex) end; with AxGrid1 do begin BeginUpdate(); SortOnClick := EXGRIDLib.SortOnClickEnum.exNoSort; with (Columns.Add('Exontrol.ComboBox') as EXGRIDLib.Column).Editor do begin EditType := EXGRIDLib.EditTypeEnum.UserEditorType; UserEditor('Exontrol.ComboBox',''); with UserEditorObject do begin end; end; DrawGridLines := EXGRIDLib.GridLinesEnum.exRowLines; TreeColumnIndex := -1; DefaultItemHeight := 21; with Items do begin h := AddItem('shows always the drop-down editor'); CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.CenterAlignment; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXGRIDLib.DividerAlignmentEnum.DividerCenter; SelectableItem[h] := False; EnableItem[h] := False; CellEditorVisible[TObject(AddItem(TObject(10248))),TObject(0)] := EXGRIDLib.EditorVisibleEnum.exEditorVisible; CellEditorVisible[TObject(AddItem(TObject(10249))),TObject(0)] := EXGRIDLib.EditorVisibleEnum.exEditorVisible; CellEditorVisible[TObject(AddItem(TObject(10250))),TObject(0)] := EXGRIDLib.EditorVisibleEnum.exEditorVisible; h := AddItem('shows the drop-down editor when user clicks it'); CellHAlignment[TObject(h),TObject(0)] := EXGRIDLib.AlignmentEnum.CenterAlignment; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXGRIDLib.DividerAlignmentEnum.DividerCenter; SelectableItem[h] := False; EnableItem[h] := False; AddItem(TObject(10248)); AddItem(TObject(10249)); AddItem(TObject(10250)); end; EndUpdate(); end |
1107 |
The ItemHeight property is not working (method 2)
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; ScrollBySingleLine := True; (Columns.Add('Column') as EXGRIDLib.Column).Width := 128; with Items do begin CellSingleLine[TObject(AddItem('This is a bit of text that should break the line')),TObject(0)] := EXGRIDLib.CellSingleLineEnum.exCaptionWordWrap; h := AddItem(''); ItemDivider[h] := 0; SelectableItem[h] := False; ItemDividerLineAlignment[h] := EXGRIDLib.DividerAlignmentEnum.DividerCenter; ItemHeight[h] := 3; CellSingleLine[TObject(AddItem('This is a bit of text that should break the line')),TObject(0)] := EXGRIDLib.CellSingleLineEnum.exCaptionWordWrap; end; EndUpdate(); end |
1106 |
The ItemHeight property is not working (method 1)
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; ScrollBySingleLine := True; with (Columns.Add('Column') as EXGRIDLib.Column) do begin Width := 128; Def[EXGRIDLib.DefColumnEnum.exCellSingleLine] := TObject(0); end; with Items do begin AddItem('This is a bit of text that should break the line'); h := AddItem(''); ItemDivider[h] := 0; SelectableItem[h] := False; ItemDividerLineAlignment[h] := EXGRIDLib.DividerAlignmentEnum.DividerCenter; ItemMinHeight[h] := 3; ItemMaxHeight[h] := 3; AddItem('This is a bit of text that should break the line'); end; EndUpdate(); end |
1105 |
How do I add a total field locked at the bottom of the control
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddGroupItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddGroupItemEvent); begin with AxGrid1 do begin with Items do begin ItemDividerLine[e.item] := EXGRIDLib.DividerLineEnum.EmptyLine; FormatCell[TObject(e.item),TObject(GroupItem[e.item])] := 'value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`'; CellValue[TObject(e.item),'Min'] := 'min(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),'Min'] := EXGRIDLib.ValueFormatEnum.exTotalField; CellValue[TObject(e.item),'Max'] := 'max(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),'Max'] := EXGRIDLib.ValueFormatEnum.exTotalField; CellValue[TObject(e.item),'Sum'] := 'sum(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),'Sum'] := EXGRIDLib.ValueFormatEnum.exTotalField; ItemBackColor[e.item] := $f0f0f0; end; end end; // Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin BeginUpdate(); HasLines := EXGRIDLib.HierarchyLineEnum.exNoLine; set_Description(EXGRIDLib.DescriptionTypeEnum.exColumnsFloatBar,'Show/Hide'); ColumnsFloatBarSortOrder := EXGRIDLib.SortOrderEnum.SortAscending; ColumnsFloatBarVisible := EXGRIDLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns; ColumnAutoResize := False; BackColorSortBar := Color.FromArgb(240,240,240); rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); SingleSort := False; SortBarVisible := True; AllowGroupBy := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; with Columns do begin with (Add('Min') as EXGRIDLib.Column) do begin Visible := False; AllowDragging := False; end; var_Column := (Add('Max') as EXGRIDLib.Column); with var_Column do begin Visible := False; Visible := False; AllowDragging := False; end; var_Column1 := (Add('Sum') as EXGRIDLib.Column); with var_Column1 do begin Visible := False; Visible := False; AllowDragging := False; end; end; with Columns.Item['Freight'] do begin FormatColumn := 'currency(value)'; Def[EXGRIDLib.DefColumnEnum.exCellBackColor] := TObject(12895487); Def[EXGRIDLib.DefColumnEnum.exHeaderBackColor] := Def[EXGRIDLib.DefColumnEnum.exCellBackColor]; HeaderBold := True; AllowGroupBy := False; Alignment := EXGRIDLib.AlignmentEnum.RightAlignment; end; ScrollBySingleLine := False; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exBottom] := 2; hL := LockedItem[EXGRIDLib.VAlignmentEnum.exBottom,0]; ItemDivider[hL] := 0; ItemHeight[hL] := 3; ItemDividerLineAlignment[hL] := EXGRIDLib.DividerAlignmentEnum.DividerTop; ItemDividerLine[hL] := EXGRIDLib.DividerLineEnum.DoubleLine; hL := LockedItem[EXGRIDLib.VAlignmentEnum.exBottom,1]; CellValue[TObject(hL),TObject(6)] := 'sum(all,rec,dbl(%6))'; CellValueFormat[TObject(hL),TObject(6)] := EXGRIDLib.ValueFormatEnum.exTotalField; ItemHeight[hL] := 24; ItemBold[hL] := True; end; Columns.Item['EmployeeID'].SortOrder := True; EndUpdate(); end |
1104 |
How can I add a total field, when I use grouping
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxGrid1_AddGroupItem(sender: System.Object; e: AxEXGRIDLib._IGridEvents_AddGroupItemEvent); begin with AxGrid1 do begin with Items do begin ItemDividerLine[e.item] := EXGRIDLib.DividerLineEnum.EmptyLine; FormatCell[TObject(e.item),TObject(GroupItem[e.item])] := 'value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`'; CellValue[TObject(e.item),'Min'] := 'min(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),'Min'] := EXGRIDLib.ValueFormatEnum.exTotalField; CellValue[TObject(e.item),'Max'] := 'max(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),'Max'] := EXGRIDLib.ValueFormatEnum.exTotalField; CellValue[TObject(e.item),'Sum'] := 'sum(current,all,dbl(%6))'; CellValueFormat[TObject(e.item),'Sum'] := EXGRIDLib.ValueFormatEnum.exTotalField; ItemBackColor[e.item] := $f0f0f0; end; end end; // Change event - Occurs when the user changes the cell's content. procedure TWinForm1.AxGrid1_Change(sender: System.Object; e: AxEXGRIDLib._IGridEvents_ChangeEvent); begin with AxGrid1 do begin Refresh(); end end; with AxGrid1 do begin BeginUpdate(); HasLines := EXGRIDLib.HierarchyLineEnum.exNoLine; ColumnAutoResize := False; BackColorSortBar := Color.FromArgb(240,240,240); rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); SingleSort := False; SortBarVisible := True; AllowGroupBy := True; Columns.Item[TObject(1)].SortOrder := True; with Columns do begin (Add('Min') as EXGRIDLib.Column).Visible := False; (Add('Max') as EXGRIDLib.Column).Visible := False; (Add('Sum') as EXGRIDLib.Column).Visible := False; end; with Columns.Item['Freight'] do begin Def[EXGRIDLib.DefColumnEnum.exCellBackColor] := TObject(12895487); Def[EXGRIDLib.DefColumnEnum.exHeaderBackColor] := Def[EXGRIDLib.DefColumnEnum.exCellBackColor]; HeaderBold := True; AllowGroupBy := False; end; ScrollBySingleLine := False; with Items do begin LockedItemCount[EXGRIDLib.VAlignmentEnum.exBottom] := 1; hL := LockedItem[EXGRIDLib.VAlignmentEnum.exBottom,0]; ItemDivider[hL] := 0; ItemHeight[hL] := 24; ItemDividerLineAlignment[hL] := EXGRIDLib.DividerAlignmentEnum.DividerTop; ItemDividerLine[hL] := EXGRIDLib.DividerLineEnum.DoubleLine; CellValue[TObject(hL),TObject(0)] := 'sum(all,rec,dbl(%6))'; CellValueFormat[TObject(hL),TObject(0)] := Integer(EXGRIDLib.ValueFormatEnum.exTotalField) Or Integer(EXGRIDLib.ValueFormatEnum.exHTML); CellHAlignment[TObject(hL),TObject(0)] := EXGRIDLib.AlignmentEnum.RightAlignment; FormatCell[TObject(hL),TObject(0)] := '''Freight: <bgcolor=FFC4C4> ''+(value format ``) + ` `'; end; EndUpdate(); end |
1103 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with Columns do begin Add('City'); (Add('Start') as EXGRIDLib.Column).Visible := False; (Add('End') as EXGRIDLib.Column).Visible := False; end; set_Description(EXGRIDLib.DescriptionTypeEnum.exColumnsFloatBar,'Show/Hide'); ColumnsFloatBarSortOrder := EXGRIDLib.SortOrderEnum.SortAscending; ColumnsFloatBarVisible := EXGRIDLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns; EndUpdate(); end |
1102 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeHiddenColumn
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with Columns do begin Add('City'); (Add('Start') as EXGRIDLib.Column).Visible := False; (Add('End') as EXGRIDLib.Column).Visible := False; end; set_Description(EXGRIDLib.DescriptionTypeEnum.exColumnsFloatBar,'Show'); ColumnsFloatBarVisible := EXGRIDLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; ColumnsFloatBarSortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |
1101 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeGroupByColumns
with AxGrid1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXGRIDLib.AppearanceEnum.Etched; with Columns do begin Add('City'); Add('Start'); Add('End'); end; AllowGroupBy := True; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; BackColorSortBar := Color.FromArgb(250,250,250); set_Description(EXGRIDLib.DescriptionTypeEnum.exColumnsFloatBar,'Group-By'); ColumnsFloatBarVisible := EXGRIDLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeGroupByColumns; ColumnsFloatBarSortOrder := EXGRIDLib.SortOrderEnum.SortAscending; Columns.Item['City'].SortOrder := EXGRIDLib.SortOrderEnum.SortAscending; EndUpdate(); end |