0

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 Answer 1

1

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 ! ;)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.