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

Sort direction arrow in column header cell

Thread ID:





5707 Jul 15,2003 12:54 AM UTC Jul 15,2003 12:02 PM UTC WinForms 2
Tags: GridControl
Jim Stewart
Asked On July 15, 2003 12:54 AM UTC

I took the modified sort by column from the samples and modified it for my virtual grid. However, due to something unknown that I have done, the sort direction arrow on the column header 1) only shows on column 1, and 2) doesn't change when clicked. I have the data source sorting correctly, and the grid displays is correctly. Please check the enclosed file for the code. I've remove most of the extraneous code not applicable to this situation. Also, please explain what mechanism causes the arrow to show and how to change its indication. Thanks in advance, Jim Stewart

Administrator [Syncfusion]
Replied On July 15, 2003 06:48 AM UTC

You said you removed some code from the file. Have you overridden OnSaveCellInfo? If so, are you setting e.Handled = true when e.RowIndex = 0. If you did, then the grid is not trying to save the values you set into the header cells. In particular, it will not be saving the Tag object that is used to handle the sorting header. This might explain the behavior you are seeing.

Jim Stewart
Replied On July 15, 2003 12:02 PM UTC

Thinking that was extraneous, I did remove it. As it turns out, you caught it without even seeing it! Here's the old code: protected override void OnSaveCellInfo(GridSaveCellInfoEventArgs e) { if (m_AllowEdits && e.RowIndex > 0 && e.ColIndex > 0) { object data = m_Data[e.RowIndex - 1]; GridStyleInfo gridStyle = e.Style; m_CellInfo[e.ColIndex].SaveCellData (gridStyle, data); } e.Handled = true; } When I move the e.Handled into the if block, That takes care of it. Thanks so much.


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