jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts

  • Reksy
    Participant

    Thank you!

    in reply to: Grid AJAX Paging Grid AJAX Paging #70296

    Reksy
    Participant

    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?

    in reply to: Grid AJAX Paging Grid AJAX Paging #70287

    Reksy
    Participant

    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!

    in reply to: Grid AJAX Paging Grid AJAX Paging #70205

    Reksy
    Participant

    Thank you! But where I can find it? (Shying-_-)

    in reply to: Grid AJAX Paging Grid AJAX Paging #70189

    Reksy
    Participant

    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!

    in reply to: Grid AJAX Paging Grid AJAX Paging #70166

    Reksy
    Participant
Viewing 6 posts - 1 through 6 (of 6 total)