Last post Jun 01, 2017 09:48 AM by Cathy Zou
Member
24 Points
316 Posts
May 31, 2017 03:16 PM|Aliyilmaz|LINK
Hi everyone.
I want to use slickgrid with pager. How can I use. Can anyone help me?
Star
8670 Points
2882 Posts
Jun 01, 2017 09:48 AM|Cathy Zou|LINK
Hi Aliyilmaz,
You want to use slickgrid with pager, then you could refer to the following code:
//Page event var onDataPagedEvent = function (e, args) { var pageNum = args.pageNum; var pageSize = args.pageSize; loadGridPaged(pageNum, pageSize, $('#TB_Search').val()); }; //Pagination data acquisition method encapsulation function loadGridPaged(pageNum, pageSize,txt) { var pagetxt = { searchtxt: txt, pageNum: pageNum, pageSize: pageSize } ajaxPost('/Stk/StkInm/StkInmSearch/' + pagetxt, JSON.stringify(pagetxt), function (result) { data = result.t; var rowCount = result.s; var pageCount = Math.ceil(rowCount / pageSize); var pageInfo = {}; pageInfo.pageNum = pageNum; pageInfo.pageSize = pageSize; pageInfo.totalRowsCount = rowCount; pageInfo.totalPagesCount = pageCount; gridView = new Slick.Data.DataView({ inlineFilters: true }); grid = new Slick.Grid("#GridSearch", Data, Columns, Options); gridView.setItems(data, "id"); grid.setSelectionModel(new Slick.RowSelectionModel()); //Register paging controls var pager = new Slick.Controls.PagerSvr(gridView, grid, PageInfo, $("#pagergrid")); pager.onDataPaged.subscribe(onDataPagedEvent); }); }
For more information, please refer to the following code:
https://github.com/mleibman/SlickGrid/blob/gh-pages/examples/example4-model.html
Hope these could be helpful to you.
Best regards,
Cathy
Member
24 Points
316 Posts
Slickgrid Pager Error
May 31, 2017 03:16 PM|Aliyilmaz|LINK
Hi everyone.
I want to use slickgrid with pager. How can I use. Can anyone help me?
https://www.portakalahsap.com
https://www.portakalahsap.com/ofis-mobilyalari
Star
8670 Points
2882 Posts
Re: Slickgrid Pager Error
Jun 01, 2017 09:48 AM|Cathy Zou|LINK
Hi Aliyilmaz,
You want to use slickgrid with pager, then you could refer to the following code:
For more information, please refer to the following code:
https://github.com/mleibman/SlickGrid/blob/gh-pages/examples/example4-model.html
Hope these could be helpful to you.
Best regards,
Cathy
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.