This is a migrated thread and some comments may be shown as answers.

Persist the grid parameter

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vlad
Top achievements
Rank 1
Vlad asked on 01 Dec 2015, 04:46 AM

Hi guys

Kendo UI docs is very confusing - that's why I am struggling to find the way how to add extra parameter into the grid selection (serverSide filtering).

I want to show the list of the quotes for the selected product code. 

I am doing on the Search button click

grid.dataSource.read({productCode: quotesProductCode.val() });

It works fine on the click, but grid has the paging and the parameter is wiped out. How to persist it until the user will clean up the filter?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dominik
Top achievements
Rank 1
answered on 02 Dec 2015, 03:57 PM
Your dataSource read should needs to pass the filter parameter. You can do that in the "read: { data: {param:"hello world"}}" or in parameterMap. You might want to conditionally add the filter param in the parameterMap instead of hardcoding in the onclick. So just call dataSource.read() and add the productCode param in the "parameterMap" 
Tags
Grid
Asked by
Vlad
Top achievements
Rank 1
Answers by
Dominik
Top achievements
Rank 1
Share this question
or