Welcome to the Flutter feedback portal. We’re happy you’re here! If you have feedback on how to improve the Flutter, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

I made an example here:

https://github.com/ben-pac/flutter_sf_data_grid_filter_error

When I select a value in the DropdownMenu in the AppBar, I set a filter based on the possible values in the first column "group":

DropdownMenu<Group>(
dropdownMenuEntries: _source.groups.map((g) => DropdownMenuEntry<Group>(value: g, label: g.name)).toList(),
onSelected: (Group? selected) {
_source.clearFilters(columnName: "group");
if (selected != null) {
_source.addFilter(
"group",
FilterCondition(
type: FilterType.equals,
value: selected,
filterBehavior: FilterBehavior.strongDataType,
filterOperator: FilterOperator.and,)
);
}
},
)


I believe the values are never actually compared in the case of FilterBehavior.strongDataType and custom data types.

Looking in the code, I think either datagrid_helper.dart -> compareEquals() is missing a check, or datagrid_helper.dart -> _getCompareValue()  should have a check:
 

if (cellValue is Comparable) {
  return cellValue.compareTo(filterValue);

}


Best regards,