I selected the grid widget for this ticket, but the question is for all widgets with a remote filter service. I'm not finding a way to configure the DataSource to send the field data types, as defined in the schema, along with the filter request. The filter request array includes the field name, field value and ignore case values. It needs to also include the field data type, from the perspective of the DataSource.
I know that I can parse values on the server side to try to guess the data type, as with the example applications, but that's not reliable in all cases, and I don't want to do that. It's better to know the field type based on the perspective of the widget.
Hopefully I'm just missing the DataSource configuration option to 'Include Field Data Types in Filtering Requests'. If that doesn't exist, please add it as an enhancement request, and let me know the most effective way to accomplish this that will work for all widget and data source combinations. I figured out that I can do this with a grid:
parameterMap: function (data, type) {
var fields = $("#grid").data("kendoGrid").dataSource.options.schema.model.fields;
var types = {};
for (let key in fields) {
types[key] = fields[key].type;
}
return $.extend({types}, data);
}
But I also have a Kendo Form with a form field edit of type MultiColumnComboBox, and the same approach will probably work, but I have to figure out how to get at the schema configuration in that case, and probably other combinations in the future.