Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1825
Cell Formatting ?
posted

Good morning,

Using version 10.2 of the wingrid object.

I want to format the cell display of col2 based on the value in col1.

So the rows in col1 can have many different values.

Col2 has numeric data in each cell.

Some of col2 data is currency values some are percentage values.

Need to format the values with the #.##% sign or the currency $##,##0.00 formats.

Can this be done? And if so can you give an code example? [ VB.net would be nice :) ]

I am currenlty looking at the InitializeRow event of the grid.

Select Case e.Row.Cells(0).Text
  Case "Perc %"
   e.Row.Cells("Zone 1 Quant").text.Format("#0.00%")
  Case Else
   e.Row.Cells("Zone 1 Quant").text.Format("$##,##0.00")
End Select

Thanks

Deasun

 

Parents
No Data
Reply Children