c# - Setting individual values in ASPxGridView -


i have aspxgridview gets populated database. in code works correctly (about 95% sure of this) , want call

e.setvalue("meantime") = meantimecell; 

unfortunately not exist. have searched cannot find answer.

protected void rtmonitoringgrid_htmlrowcreated(object sender, devexpress.web.aspxgridviewtableroweventargs e)      if (e.rowtype == devexpress.web.gridviewrowtype.data)       {         //this gets value in gridview          string meantimecell = e.getvalue("meantime").tostring();          try         {            double result;            if (double.tryparse(meantimecell, out result))            {                 //this string want overwrite old cell data               meantimecell = string.format("{0}s", math.round(result, 1));               //setvalue called here            }         }         catch (exception ex)         {          }      } } 

does know easy fix this? have thought of trying format data before gets put in aspxgridview think prove equally difficult.

make unbound column , handle gridviews oncustomunboundcolumndata event. in event, set value whatever want be.

edit: since need round number database (if willing drop s on end of it) set column's displayformat.formattype "numeric" , displayformat.formatstring display many decimal places want.

you follow approach in devexpress thread listed here


Comments

Popular posts from this blog

What Are The Best Universities In The World?

Hard vs. Soft Water: What's The Difference?

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -