Advanced Cell formatting - DataGridViewColumn
Using StringTo() method for Formatting cell within the DataGridViewColumn:
I have created custom DataGridViewColumn and DataGridViewCell based on user defined data type. It stores float numbers that represent various strings. For example number 0.001 represents string "00", number 1.002 is formatted as "1T", number 0.5 is "05" while integers are formatted as they are (100 => "100") etc. Override ToString() method is used to provide the conversion from a number to a string.
I now need to force my custom column to display the formatted strings instead of the float values that I stored in database, i.e. when I type 0.001 into the cell, I need to display "00" but the value of the cell must retain value 0.001. Usually I would do it using Format property of the Column.CellTemplate.Style but I have no idea how to do it when the format conversion can't be described by standard string like "0:00.00" or "$ #0.00" but is based on an overridden method defined in the user defined type. Any idea how to solve it and keep the column bounded to a data source and allow user to modify and store values through the same column?

