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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

multiple column sorting

Thread ID:





12312 Mar 25,2004 07:00 PM UTC Mar 26,2004 03:30 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On March 25, 2004 07:00 PM UTC

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

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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\\Grid\Samples\DataBound\DataBoundSortByDisplayMember for a use case.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon