0
votes

I have the below model schema for a field in my Kendo UI grid widget:

RS_LookBackDays: { type: "number", editable: true },

The columns configuration for the same is :

{ field: "RS_LookBackDays", title: "Rate Schedule – # Lookback Days", type: "number" },

I have a custom client-side filtering on a property that is bound to a text box which is then applied to the dataSource on the click of a search button.

if (ctrl.selectedRS_LookBackDays && ctrl.selectedRS_LookBackDays != '') {
    var filter = { field: "RS_LookBackDays", operator: "eq", value: ctrl.selectedRS_LookBackDays };
    filters.push(filter);
}

ctrl.kendoGrid.dataSource.filter(filters);

There are other filters being applied on 'string' columns which execute successfully and filter the grid data. However, for numeric columns I get a client-side error message : 'TypeError: Object doesn't support property or method 'toLowerCase'". I am unable to get this work even though I have specified the type on the column as well as the grid.

1

1 Answers

1
votes

Solved It. I just had to use the below code:

 var filter = { field: "RS_LookBackDays", operator: "eq", value: kendo.parseInt(ctrl.selectedRS_LookBackDays) };

So silly ! ;)