jQWidgets Forums
Forum Replies Created
-
Author
-
June 4, 2015 at 11:10 am in reply to: set pagesize and totalrecords dynamically set pagesize and totalrecords dynamically #72032
Thank you!
Hi, again!
Yeap, it work with pagesize in grid.
And paging problems:
I cant put enpointurl in url parametr or process it on server side like http://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-paging.htm because my response look like this:GetListData: function (webUrl, listTitle, fnSuccess, params) { var endpointUrl = webUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/items?$skiptoken=Paged=TRUE&p_ID=" + (params['startItemId'] - 1) + '&$filter=OData__ModerationStatus eq ' + params['Status']+ ' &$top=' + params['itemsCount']; //var endpointUrl = webUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/items?$filter=OData__ModerationStatus eq " + params['Status']; params['current'] = endpointUrl; return ListData.executeRequest(endpointUrl, 'GET',null,null, fnSuccess,params); }
Rest Api its web services, I can only sent ajax request like this.=((
Is there a way?
Thank you!
I looked this examples, but I didn find any example how to download grid data via Ajax for next/prev/last/first paging;
In my case I can get information only via ajax (not php or arp.net).
Right now my init looks like this
var source = { datatype: "json", pagesize: params['itemsCount'], datafields: [ { name: 'ID', type: 'int' }, { name: 'IteDbdDate', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'Modified', type: 'string' }, { name: 'ModerationStatus', type: 'int' } ], id: 'ID', localdata: obj, root: 'listData', cache: false, beforeprocessing: function(data) { if (data != null) { this.totalrecords = data[0].totalCount; } } }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxWidget_"+params['elementGuid']).jqxGrid( { width: 602, source: dataAdapter, selectionmode: 'multiplerowsextended', sortable: true, pageable: true, autoheight: true, columnsresize: true, virtualmode: true, theme: "custom", rendergridrows: function (obj) { return obj.data; }, filtermode: 'excel', pagermode: 'simple', columns: [ { text: 'Название', datafield: 'Title', width: 150, cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) { return '<span class="ite-open-dialog" ><a>' + value + '</a></span>'; } }, { text: 'ИД', datafield: 'ID', width: 100, cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) { return '<span class="ite-protocol-id" >' + value + '</span>'; } }, { text: 'Дата', datafield: 'IteDbdDate', width: 150, cellsformat: 'D' }, { text: 'Изменен', datafield: 'Modified', width: 200 } ]
How i should update data?
Hope for your help!
Thank you! But where I can find it? (Shying-_-)
Hi,again, I faced with new question.
Where I should do ajax request(for new data) when paging in grid? In beforeprocessing or in ready function in data adapter or someone else?
Thanks!
Thank you!
This example help me to understand : http://www.jqwidgets.com/jquery-widgets-demo/demos/php/serverfiltering_paging_and_sorting.htm
-
AuthorPosts