Im implementing multiple column sorting in the GDBG, and need to modify the header cell renderer that renders the little up/down triangles. I''m going to be rendering numbered up/down triangles instead.
I cant for the life of me find where the up/down triangle is rendered. Where would be best place to override this behaviour be found.
Ideally, instead of assigning a ListSortDirection to the Column.StyleInfo.Tag, I would like to assign a class that comprises a ListSortDirection and a number indication sort priority.
ADAdministrator Syncfusion Team March 25, 2004 10:35 PM UTC
That sort indicator is drawn as GridSortColumnHeaderCellRenderer.Draw. The sort header is a celltype. The GridDataBoundGrid has code to add a ColumnHeaderCell celltype.
model.CellModels.Add("ColumnHeaderCell", new GridSortColumnHeaderCellModel(model));
To handle drawing s special sort header, you can derive a custom cell control and handle it that way. Or, you could try catching the CellDrawn event, and if the cell being drawn is a ColumnHeaderCell, then draw the extra character over what is drawn by default. This sendond alternative does not require creating your own cell control.
ADAdministrator Syncfusion Team March 26, 2004 03:20 PM UTC
Im going down the road of writing my own cell renderer.
I want to intercept the click event that normally gets routed to the GDBG sort method. I am going to need richer click events, such as control-double-click causing a column to be added to the collection of sorted columns.
What click handler is used to route double-click events to the GDBG sort method?
ADAdministrator Syncfusion Team March 26, 2004 03:30 PM UTC
The GridDataBoundGrid.OnCellDoubleClick is where the sorting is called when you are using double click sorting.
If you want to handle your own sorting, you can catch the CellDoubleClick event, do your sort, and set e.Cancel = true to prevent the grid''s default sorting from taking place. See the \Essential Suite\18.104.22.168\Grid\Samples\DataBound\DataBoundSortByDisplayMember for a use case.