Hello
In my application I am using UltraWinGrid. First I Load an XSD in a data set then an xml to validate and load data. Then assign this data set as data source of grid. I want to show numeric values as 1,234,567.8901 (comma seperated etc.). For this I used Format property of UltraGridColumn and set the value as #,###,###.#### and this works fine. Problem is with zero value. When there is zero value for a numeric column, grid shows a blank cell instead of zero. When format of the column is removed zero will appear in cell. I expect that grid should show zero instead of blank cell when format is applied. Note that the data types are decimal, float etc. for numeric columns.
Can anyone help me?
Thanks in advance.
Thanks Ralf,
It solved my probem.
Thank you,
Pravin
Hi Pravin,
now I understand what format do you want. If you take the follwing format string the values will be formated as requested:
##,###,###,##0.###########
A zero (0) will be displayed as 0 and a value like 1.1 will be displayed as 1.1.
Hope this will help you.
Thanks Ralf for the suggestion.
I tried out this way and observed that the last '0' acts a padding character.
When the column format is '#,###,###.####' and value is 1.1 then this value appears as 1.1000 in the grid.
.i.e zero is padded at the end.
If cell value is '0' (zero) then is displayed as '.0000'.
In my application due to high data precision the format is ###,###,###,###.############.( i.e. 12 disgits before and after decimal point). I cannot change this format.
So zero value is always seen as '.000000000000' and 1.1 is shown as '1.100000000000'. The padded zeros are undesirable.
My requirement is cell value should be seen as it is even after applying format i.e. 0 or 1.1 in above case.
Is there any way or property by which I would be able to display cell value as it is along with format applied to it.
Also, value 0(zero) is displayed as 0 and not blank.
Thanks,
Pravin.
Hi,
replace the last # by 0 and normally a 0 will by displayed. Take a look into the NetAdantage Help by searching for FormatStrings.
Hope this will help.