Hi everyone,
I am hoping someone can help me solve a problem I am having with the GridViewDecimalColumn in my radGridView. I have an unbound column named "Days". This column is populated when the grid is loaded in the following way:
When I try and sort on this value, the sort order does not make any sense. I get things like the following:
14
14
33
33
36
17
14 (should be at the top with the other 14's)
The sort does not follow any sort of logic and instead appears to just be sorting the numbers randomly. How can I get it to sort the numbers properly (IE ascending/descending order)
Thanks
----- EDIT-----------
Now that I have played with it a bit more, the grid is sorting, it is just sorting extremely slow. Moving the scrollbar up and down will force the grid to repaint and you can see the sort occurring. Why is this so slow? There are only around 160 rows in this grid. I have sorted other grids with 200+ rows and the sort is instantaneous.
I am hoping someone can help me solve a problem I am having with the GridViewDecimalColumn in my radGridView. I have an unbound column named "Days". This column is populated when the grid is loaded in the following way:
private void grid_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
if (e.Column.Name == "Days")
{
MyObject obj = (MyObject)e.Row.DataBoundItem;
if (obj != null)
{
TimeSpan span = DateTime.Now.Date - obj.SomeDate.Date;
e.CellElement.Value = span.Days;
}
}
}
When I try and sort on this value, the sort order does not make any sense. I get things like the following:
14
14
33
33
36
17
14 (should be at the top with the other 14's)
The sort does not follow any sort of logic and instead appears to just be sorting the numbers randomly. How can I get it to sort the numbers properly (IE ascending/descending order)
Thanks
----- EDIT-----------
Now that I have played with it a bit more, the grid is sorting, it is just sorting extremely slow. Moving the scrollbar up and down will force the grid to repaint and you can see the sort occurring. Why is this so slow? There are only around 160 rows in this grid. I have sorted other grids with 200+ rows and the sort is instantaneous.