This is a migrated thread and some comments may be shown as answers.

Sorting Currency/Numbers with Grid created in code behind

1 Answer 181 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 19 Jan 2012, 03:52 PM
Hi,

I have Telerik grid control where the columns and rows are added in the code behind.

Everything works great - except the sorting.  I need to have currency fields sort by currency/number fields sort properly instead of using string sort.  

Any idea the best way to go about this is for the approach below is?

Thanks,
Chris

DataTable dt = new DataTable();
 
dt.Columns.Add("Column1");
dt.Columns.Add("Cost");
 
string[] info = new string[2];
info[0] = "Row1_cell1";
info[1] = "23.00";
 
Session["DataTable"] = dt;
RadGrid1.DataSource = dt;
RadGrid1.DataBind();

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Jan 2012, 10:35 AM
Hello Chris,

Take a look at the following help documentation.
Applying Custom Sort Criteria.

-Shinu.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or