Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Column Sorting in C#

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Column Sorting in C#
Link Posted: 28-Jan-2008 07:03
I am having two issues with sorting by clicking on a columns' header.

1. I have a column that is sorting alphanumeric instead of by actual number value (ie. 1, 10, 2, 20 instead of 1,2,10,20).  I tried making this column a NumberColumn in the designer.cs file, but that did not help.  I do not see a way to change this column type in the Column Collection Editor (or create a new NumberColumn for that matter).  Am I missing something else that I should change?

2. I have another column where, in some cases, I change the value on the fly grid, but not the underlying node.  When I try to sort this way, the sort does not recognize any values just on the grid and not in a node.  Instead, it sorts as if those cells were blank.  Is there a way to sort based on the grid values instead of the node values?

Thank you,
Link Posted: 28-Jan-2008 21:56

1. Here is what I have in visual designer:
As you can see there's a list of columns that can be added to the flygrid.

2. I do not completely get the idea, but you can try to override the FlyGrid.GetComparer method in order to make it sort the FlyGrid using a custom comparer.
Link Posted: 29-Jan-2008 02:26
Thank you for your timely response.

1. I read about that drop down on the add button on other forums, but I do not have that on my version.  I am using Version is there a setting somewhere I am missing.  Or is there a property on my fly grid that needs to be set to accept different columns.

Link Posted: 29-Jan-2008 22:17

It looks like you have some versioning/caching problems with FlyGrid design-time dll?
Did you have another version of the control on your system?