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

Paging remembers previous value in ASP.NET MVC

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Avinash
Top achievements
Rank 1
Avinash asked on 09 Aug 2016, 09:29 PM

I have a form with input text boxes, search button and grid to display the result. Once user clicks on Search button, the result get displayed in the grid. I have 10,20, 50, 100, All set as paging option in the grid. At first when the result gets displayed in the grid the paging value is 10. The issue is once the user selects different paging value e.g. 50 and perform search again, the result that get displayed in the grid is with paging value of 50. 

Is there anyway to reset paging value back to 10 again whenever new search is performed?

Thanks.

Avinash

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 11 Aug 2016, 01:30 PM
Hello Avinash,

To achieve this requirement, you can get a reference to the dataSource of the grid Kendo object and execute the pageSize method:
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-pageSize

Here are some more examples:
http://www.telerik.com/forums/is-there-a-way-to-change-the-pagesize-dinamically
http://stackoverflow.com/questions/11330474/how-to-change-page-size-dynamically-in-kendo-ui-grid

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Avinash
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or