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!
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
I guess I am auto generating columns then, as this is the error I am getting when i try that.
Error 7 'Infragistics.Web.UI.GridControls.GridField' does not contain a definition for 'DataFormatString' and no extension method 'DataFormatString' accepting a first argument of type 'Infragistics.Web.UI.GridControls.GridField' could be found (are you missing a using directive or an assembly reference?) 54 66