Hi, I am working on a UltraGrid with multiple columns, where only one column is editable. For the column I set the .format ="#,##0;(#,##0);0" and .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Integer in GridInitializeLayout. When I enter 123456 (or -123456) in the cell, after leaving the cell, it still shows 123456 (or -123456) instead of 123,456 (or (123,456)). For any non-editable columns it works fine.
Any help will be appreciated. Thanks!
Hi,
I can't think of any reason why the editability of the column should make any difference here. If a cell is actually in edit mode, then the Format will not be applied to that cell. Format only applies when a cell is not in edit mode. But as soon as you leave the cell, the format should display.
What's the DataType of this column? Format will not work in a String column, for example, because the string.ToString method doesn't support any formatting. But this should work if the column is a numeric type like int.
Note that the Style has no effect on the DataType.
Hi Mike,
Thank you very much for the quick response. The cell was set as string. Now it's working.
Thanks!