Skip to content

Commit e5c7d25

Browse files
Update grid-page-size-all-in-asp-core.md
I have made the changes on for dropdownlist. coz its giving undefined when it try to get dropdownlist.
1 parent 3e83b1f commit e5c7d25

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/knowledge-base/grid-page-size-all-in-asp-core.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ After the document is ready, dynamically add the option for the **All** page siz
3535
$(function () {
3636
3737
var grid = $('#grid').data('kendoGrid');
38-
39-
var pageSizeDropDownList = grid.wrapper.children(".k-grid-pager").find("select").data("kendoDropDownList");
38+
//this line will give the undefined when it try to find the dropdownlist.
39+
//var pageSizeDropDownList = grid.wrapper.children(".k-grid-pager").find("select").data("kendoDropDownList");
40+
41+
//the alternate code this below line.
42+
var pageSizeDropDownList= grid.wrapper.find('.k-pager-sizes').find('[data-role="dropdownlist"]').data('kendoDropDownList');
4043
console.log(pageSizeDropDownList)
4144
pageSizeDropDownList.dataSource.add({text:"All", value:'all'})
4245
pageSizeDropDownList.dataSource.sync()

0 commit comments

Comments
 (0)