we started using an option to show all records in the grid by giving the user choose from predefined values [10, 25, 50, All], to set all to datasource we need to set it to undefined
grid.dataSource.pageSize(undefined);
but it will be ignored & page size will not be changed
please provide workaround
12 Answers, 1 is accepted
dojo
https://dojo.telerik.com/asoPIkan/5
Hello Aleksandr,
Thank you for writing to us and sending the dojo sample. The solution consists of 2 parts:
1. Removing the $top=20 from here to get all the data:
2. Calling undefined here:
grid.dataSource.pageSize(undefined);
position: "top"
https://dojo.telerik.com/asoPIkan/18
It works as expected on my side. Feel free to try it out and let me know how it goes from your end.
Regards,
Eyup
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello Eyup,
appreciate for helping me, still have one issue, it is related than we use approach of selection the items across the pages, please see attached 1 jpg
Thx Alex
& the question about grid.dataSource.pageSize(undefined);
we store grid page size value in localstorage to have same across all the modules, so if i store All (undefined), i need to load it to set to the grid, but it will be ignored, how i can set All programmatically?
dojo
https://dojo.telerik.com/asoPIkan/21
Hi Aleksandr,
You can achieve this requirement using the following approach:
var grid = $("#grid").data().kendoGrid;
grid.one("dataBound",function(e){
grid.dataSource.pageSize(grid.dataSource.data().length);
});
https://dojo.telerik.com/asoPIkan/34
Feel to give it a try and let me know if it helps you.
Regards,
Eyup
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Eyup,
the approach is not ideal, but acceptable, appreciate for help
P.S if the team can make our live easier adding features we use to the grid, to have them out of the box, i would appreciate
fixed workaround (the workaround above always set pager to all)
grid.one("dataBound", function (e) {
if (grid.dataSource.pageSize() === undefined) {
grid.dataSource.pageSize(grid.dataSource.data().length);
}
});
Hello Aleksandr,
Can you send us the new dojo URL so we can resolve the problem accordingly and send it back to you?
Regards,
Eyup
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Eyup,
taking into consideration the risk of unexpected behavior in diff cases we decided to not to deliver "All" option & set it to 20 000 (it is less user friendly, but better than bugs), it will cover "full grid" for majority of our client, hope, in future the grid will fully support "All" in all cases
Thx Alex
Thx Alex