We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

multiple column sorting

Thread ID:

Created:

Updated:

Platform:

Replies:

12312 Mar 25,2004 02:00 PM Mar 26,2004 10:30 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 25, 2004 02:00 PM

Hi, 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.

Administrator [Syncfusion]
Replied On March 25, 2004 05:35 PM

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.

Administrator [Syncfusion]
Replied On March 26, 2004 10:20 AM

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?

Administrator [Syncfusion]
Replied On March 26, 2004 10:30 AM

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\2.0.3.0\Grid\Samples\DataBound\DataBoundSortByDisplayMember for a use case.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;