c# - Accessing the actual value of a RadGrid DataItem rather than its text -


i have radgrid autogenerate columns set true.

my datasource looks following:

datatable dt = new datatable(); dt.columns.add("column1", typeof (double)); dt.columns.add("column2", typeof (double)); dt.columns.add("column3", typeof (double));  dt.rows.add(0.05547, 0.03432, 0.03444); dt.rows.add(0.54612, 0.77764, 0.86763); dt.rows.add(0.65711, 0.88735, 0.67864); 

in grids itemdatabound event formatting values percents this:

double number; if (double.tryparse(item[col.uniquename].text, out number)) {      item[col.uniquename].text = string.format("{0:p2}", number);                             } 

now lets want loop through grid dataitems somewhere else in code , original values, not formatted percent values. best way this?

foreach (griddataitem item in radgrid1.items)  {      // returning value 5 %, need 0.05547      item["column1"].text; } 

since formatting text in itemdatabound, cannot original value somewhere else in code. itemdatabound behaviour, each time when postback itemdatabound executed, (even changing page size in radgrid).

but can it, creating new datatable , filling details parallely in itemdatabound. can data datatable throughout code.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -