I have an object that has a string property which is bound to a column on my Grid. This string property contains a number of different values, including text, DateTimes, integers and doubles. I need to format differently based on the cell value, so after I have passed my collection to the Bind method I loop through the DataRows and manually set the format specifier on the row’s cell based on the cell value.
However, the formatting does not seem to get applied no matter what format I set. I have tried to set the FormatProvider also, but it too makes no difference. I have read various forum threads about this, but nothing suggested so far has worked, including this:
I wonder whether it has something to do with the underlying property type being a ‘string’ that prevents decimal formatting (for example) being applied to the cell’s value? Or maybe, I need to call a refresh style method on the grid once I have updated each cell’s format *after* binding.
Can anyone please suggest what I can do to get this format working please?
Imported from legacy forums. Posted by russellcoombes (had 2332 views)