Sort By Column Issue (v 2.1.0.9)

Hi,

I'm using a GDBG with 10 rows (say). I am sorting the grid by calling SortColumn method. So far no issues, everything works fine.

When I hide some rows and then do sort i see my hidden column appearing in the grid.

Ex:
I have two rows in the grid.
The column TestId value in the 1st row is 1 and in the 2nd is 2. Now I hide the 1st row. I sort the TestId column and i see 2nd row is switching to 1st row. I can see only one row in the grid. Again sort the column I see 2nd row appearing.

It appears that the grid sorting doesn't ignore the hidden rows and also it doesn't handle then hidden rows case.

What's the solution for the same?

Thanks,
Amiya


1 Reply

AD Administrator Syncfusion Team March 7, 2007 11:25 PM UTC

Hi Amiya,

There is no built-in support for this. If you want to keep HiddenRange after the sort changes in DataBoundGrid, you would have to derive the GridDataBound control and override the SortColumn Method to acheive this. Please refer to the attached sample for more details and let me know if this helps.

Sample : GDBGKeepHiddenRangeANDSelectionOnSort.zip

Best regards,
Haneef

Loader.
Up arrow icon