Hey guys!
We have a grid with a custom column of type boolean. We used a colum template with a checkbox for this and everything works fine, we also can call Sort() this column.
But we are not able to group the column. This is because of the GetFormattedValue method in the DataUti class does this:
public static string GetFormattedValue(object value, string format)
{
List<string> source = new List<string>()
{
"Double",
"Int64",
"Int32",
"Int16",
"Decimal",
"Single"
};
if (value?.GetType().Name == "DateTime" || value?.GetType().Name == "DateTimeOffset")
return Intl.GetDateFormat<object>(value, format);
return value != null && source.Any<string>((Func<string, bool>) (t => value.GetType().Name.Contains(t))) ? Intl.GetNumericFormat<object>(value, format) : (string) value;
}
If value is a boolean, the code tries to call e.g "(string) true" which is not possible. "true.ToString()" would be working.
Is there an other way to group by boolean columns in a SfGrid?
Hey, thanks for the response!