Hi,
I use Telerik RadGrid. DataSource for the grid is a web-service. One of the columns in RadGrid is a string but it contains numeric values. Though it is GridNumericColumn when I apply sorting the column is sorted as string value like 1,11,..,2, 22.
I can't change anything in datasource, including this column type.
What should I do to make the column sorted as a numeric, like 1,2,..11, 22...?
Thank you very much in advanced.
I use Telerik RadGrid. DataSource for the grid is a web-service. One of the columns in RadGrid is a string but it contains numeric values. Though it is GridNumericColumn when I apply sorting the column is sorted as string value like 1,11,..,2, 22.
I can't change anything in datasource, including this column type.
What should I do to make the column sorted as a numeric, like 1,2,..11, 22...?
My code looks like this:
grid =
new RadGrid
{
ID =
"grdChildren",
AutoGenerateColumns =
false,
DataSourceID = ds.ID,
AllowSorting =
true
};
grid.MasterTableView.Columns.Add(
new GridNumericColumn
{
DataField =
"StringDataField", HeaderText = "ShouldBeNumericSorting"
});
Thank you very much in advanced.