ADAdministrator Syncfusion Team November 10, 2004 05:44 AM
You would have to manage this on your own. GridDataBoundGrid relies on DataView.Sort to sort things, so it cannot use its default sorting support to sort an unbound column.
Here is one way you can do this. You can turn off the grid''s default sorting, and handle all sorting yourself. You can use an ArrayList of row indexes to specify the row to be shown in a particular grid row position. Then changing these index values will effectively change the row order in the grid. Once you have this arraylist set up, you can use ArrayList.Sort to sort things, passing in a custom comparer that makes the comparison''s based on the column values from the datasource. Here is a little sample (work in progress - still may have some glitches) that wraps all this up into a helper class that allows custom sorting of a GridDataBoundGrid. The helper class also supports sorting an unbound column as well. Maybe something like this will work for you.
APAnnegret PetzoldNovember 11, 2004 04:03 AM
It was perfect. Thank you very much.