I see the three options for "Header Click Sort Action" to be default, multi column, and single column. Is there a way to disable sorting when single clicking? I want to change it to sort on double click.
Is there a way of adding an absolute value sort? The only options I see are ascending, descending, none, and disabled.
Thanks!
-Nick
TryParse worked.
Try doing the double.tryparse to extract the value. If that doesn't work, I would post the issue on a msdn .net forum.
In the debugger, it's not null. It has an integer value.
Depending on the column settings that cell could be a null value. If it is a null value you obviously won't be able to cast it as double.
I would declare a variable as a double and do a double.tryparse on that cell value if that variable you declare is nothing then you don't have a double value.
after you have both your value as double you can just do a return double.compare on both values.
I'm also having trouble with sorting... Here's my code
public int Compare(object o1, object o2) { UltraGridCell left = o1 as UltraGridCell; UltraGridCell right = o2 as UltraGridCell; double x = (double)(left.Value); double y = (double)(right.Value); //Other code follows
}
on double x = (double)(left.Value) I get an InvalidCastException. The value will be an int or a double. Is there another way to extract the value?