Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use js-grid pagination #860

Closed
hwents opened this issue Jul 31, 2017 · 3 comments
Closed

How to use js-grid pagination #860

hwents opened this issue Jul 31, 2017 · 3 comments

Comments

@hwents
Copy link

hwents commented Jul 31, 2017

my code:

    $("#jsGrid").jsGrid({
		        width: "100%",
		        editing:true,
		        inserting:true,
		        filtering: false,
		        sorting: false,
		        autoload: true,
		        paging: true,
		        pageLoading: true,
		        pageSize: 15,
		        pageIndex: 1,
		        deleteConfirm: "Do you really want to delete the client?",
		        controller:{
			    	loadData: function(filter){
		    	    var deferred = $.Deferred();
			         $.ajax({
			            type: "post",
			            url: "/query/list",
			            data: filter,
			            dataType:"json",
			            success:function(datas){
			        	 debugger
			        	  var da = {
			        		data :datas.list,
			        		itemCount : datas.list.length
			        	  }
			        	 
			        	  deferred.resolve(da);
			        }
			        });
			        return deferred.promise();
		    }
		    },
		        fields: [
		            { name: "username",title:"username",type:"text",width: 150},
		            { name: "password", title:"password",type:"text", width: 50},
		            { type: "control" }
		        ]
		    });

but no pagination. Ask for help。
8

@heiovsky
Copy link

line : itemCount : datas.list.length
should be: itemsCount : datas.list.length

items not item

@hwents
Copy link
Author

hwents commented Jul 31, 2017

@heiovsky thank you very much!

@tabalinas
Copy link
Owner

@heiovsky, thank you for the answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants