Hi,
I have a wingrid which I am binding to generic list of objects. One of the objects' property has a value of Zero (0). However, it does not get displayed in the grid. I just see an empty cell.
In the column's properties, I have Nullable set to Automatic and Null Value set to 0. Am I missing something, or perhaps be doing something to have the 0 displayed in the grid's cell?
Thanks!
What is the DataType of the column?
It is a string (in the grid) and an integer in the object itself.
I'm not sure I understand. The grid column gets it's data type from the data source. If it's an integer in the data source, then it has to be an integer in the grid. There's no way it can be a different data type in the grid, unless this is an unbound column you are populating yourself.
Okay, then this really has nothing to do with the grid. Your code must be setting the value of the cell to an empty string. My guess is that the format code you are applying interprets a zero as a blank instead of a "0". So you just need to trap for a 0 value and convert the value to a string "0".
Sorry Mike,
I should have explained more. Yes I am populating the grid dynamically. The data type is integer in the collection object but is string in the grid. I am doing some formatting as well (##,###,###). It shows up fine if the value is 1.