Hi,
i have a wingrid where i can bind the data. among them i have two columns in which i place calculated columns. at the end of the value i need to place a "%" sign.
i tried to use the
_uiTargetDetailsDataGrid.DisplayLayout.Bands[ 0 ].Columns[ _percentageReceived ].UseEditorMaskSettings = true;
_uiTargetDetailsDataGrid.DisplayLayout.Bands[ 0 ].Columns[ _percentageReceived ].Format = "{0} %";
but it doesnt seem to be working.
i can go for awork arond and place the value in the cell ... as String.Format( "{0} %", value) .
but i am sure there will be some settings where i can do this in a more generic fashion.
Thank you very much for you help,
I think you can do this using the Format property of the column. But the format you are trying to use here isn't correct. Format simply takes the vaule of the cell and calls ToString on it and passes in the format. These kinds of formats don't take a replacement code like "{0}". You have to check out the ToString method of the column's data type. If it's a formula, then the column is most likely a double. So check out the Microsoft documentation on the allowable formats for a double. If memory serves, I think you can just use a format of "p".