Prevent sorting

Apr 20, 2012 at 1:35 PM

Looking through the properties, I'm not seeing a way to prevent the user from sorting.  Is there something that I'm missing?

Jul 12, 2012 at 4:52 PM

This question somewhat matches the one that I have.  I do not know if you mean for all columns or just a column.

I would like to supress sorting on a particular column, in my case columns containing images, as the built-in sort controller does not handle images.  Also, it does not mean anything to sort images.

Sort properties are somewhat lacking in SourceGrid, it seems.

The only thing that I saw is on another post.  I am not sure it is helpful for either of us, but there is:

this.<name of SG control>.SortRangeRows(...)

The first argument is:

new SourceGrid.Range(StartRow, StartCol, EndRow, EndCol)

The last argument takes an IComparer, which is a class that you implement.  Where one goes from there is something that I have not done yet.

As I asked in another post, this line seems a bit harsh for simply disabling sorting on a particular column.

Sarah

 
Coordinator
Jul 16, 2012 at 3:48 PM

See http://sourcegrid.codeplex.com/discussions/363520