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
220
How to get a column to format to a currency display?
posted

In the old UltraWebGrid you made a column format to currency by doing something like this. 

 

grdResults.Columns[0].Format = "$###,###,##0.00";

 

How do you achieve this same effect with the new WebDataGrid?

 

Thanks!

Parents
No Data
Reply
  • 33839
    Suggested Answer
    posted

    Hi whanes,

    In the WebDataGrid, BoundDataField and UnboundField both have a DataFormatString that can be used to format how data is displayed.  For example:
    this.WDG1.Columns[0].DataFormatString= "{0:c}";

    Be warned that if you autogenerate columns, those are not available in the Columns collection.

    regards,

    David Young 

Children