This project is read-only.

Prevent sorting

Apr 20, 2012 at 2: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 5: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.


Jul 16, 2012 at 4:48 PM