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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -