Format question

After a lot of frustation i''m unable to explain why this does not work: GridWebControl1.GridModel.ColStyles[posCol].Format = "0:n"; In the grid the format is not applied. Is there any condition for this to work ? string d = myDataRow["quantity"].ToString(); GridWebControl1.GridModel[i, j ].CellValue = d; where d=15200 and the style is not applied. It is the same for anyother format Thanks

1 Reply

AD Administrator Syncfusion Team February 7, 2006 09:21 PM UTC

Hi Paul, Sorry for the inconvenience caused. Here is something you can try to set the format by adding another Grid to the StockQuotes sample: this.GridWebControl2.GridModel.ColStyles[1].Format = "00.00"; this.GridWebControl2.GridModel[1, 1].CellValue = 15200; Note that formatting will not work if you pass a string as in: this.GridWebControl2.GridModel[1, 1].CellValue = "15200"; Hope this answers your question. Regards Arun

Loader.
Up arrow icon