|
Hi,
I have an unbound DataGridView and I need cells that contain double values to change their ForeColor based on a specific value in the cell. So, naturally, I'm inheriting my own cell from DataGridViewCell, add a couple properties and override GetFormattedValue. So, whenever GetFormattedValue is called, I check the value and give appropriate ForeColor. This works fine, except when I want to use a custom DefaultCellStyle.Format for my own DataGridViewColumns. This format is lost when I override GetFormattedValue, because for some reason, GetFormattedValue only works when I return a string?? (Why is that? When I just return the double object, my cells are empty).
Thanks,
Tom
|