Hi All,
I am trying to format a column in win grid to have "$" format in the way i have done earlier.
But i cant get it in the form when i run it.
In initialize layout, i am using
e.Layout.Bands[0].Columns[
"Coverage_Amount"].Format = "$#,##0.00"; -- working
"FP_Property_Limit"].Format = "$#,##0.00"; -- Not working
Second one is not working. both are editable. i tried using "c" also.
can any one help me out.
Regards,
Parthiban S
Hi,
Well, the obvious thing would be to search the code for ".Format" and see if the format of the column is being explicitly set.
Not so obvious is that the mask could be interfering with the format when the cell is in edit mode, so I'd check for ".MaskInput", also.
You could also set to see if anything is setting either the Editor or EditorControl for the column. These could affect the format, too, although this seems less likely.
Finally, I would check to see if your code is calling grid.DisplayLayout.LoadFromXML or LoadFromBinary. Loading a layout from a file will set the Format on every column. DisplayLayout.CopyFrom will also do it by copying a layout from in memory.
Mike,
Thanks for replying. Both columns are of same type ie Long data type.
i will consider your first point and look into the issue.
since i am just modifying the existing code , i dunno much of things abt infragistix.
Could you tell me the places in code where we can format a column. i really tried hard on this..
Thanks,
There are only two reasons for this that I can think of.
1) Something else in your code is changing the format property for the FP_Property_Limit column after the line of code here is executed.
2) The DataType of the FP_Property_Limit column doesn't support formatting. Are these two columns the same DataType. Is FP_Property_Limit a string?