protected override object GetFormattedValue(object value, int rowIndex, ref DataGridViewCellStyle cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context)
{
if (value != null)
{
//bool noFormatting = true;
//try
//{
// noFormatting = IsInEditMode;
//}
//catch (InvalidOperationException)
//{
// noFormatting = true;
//}
//if (noFormatting)
// return ((float)value).ToString("G");// string.Format("{0:G}", value);
//else
return ((float)value).ToString("F3"); //return string.Format("{0:F}", value);
}
return "";
}