i now learned that the only way to sort client side is to set loadonce:true,
..BUT if i set it to开发者_运维问答 true, then i would not be able to navigate page, and if i set my rownum
less than the number of data, it will not display the other data.
example, if i going to code this:
viewrecords: true,
rowList:[5,10,50,100],
pager: '#tblDataPager',
sortname: 'main_account_group_desc',
rowNum:5,
loadonce:true
and my data is more than 5, it will only show the first 5 of my data, no paging, but my sorting is ok. and if im going to change the code into this :
viewrecords: true,
rowList:[5,10,50,100],
pager: '#tblDataPager',
sortname: 'main_account_group_desc',
rowNum:5,
loadonce:false
it will display 5 data on the jqgrid, there's a page navigation (next, previous, last, first) but the sorting wont function everytime i clicked the column header.
is there a way that i can set my rownum:5
and navigate to the next data using paging while setting the loadonce:true
to enable sorting? can anybody in here who can help me? thank you
hai friend When u r saying loadonce:true then data load into jqgrid only one time. so after that what ever operation (navigation,sorting and so on) done by user that is perform in client side only.i.e that is not load the data from server side .so all client side operations (like sorting) working fine.
but When u r saying loadonce:false then every time it il bring the server side data so you feel like sorting is not working. you can handle it in your server side coding.
loadonce:true => first time only data load from server
loadonce:false => all the time data load from server
Thank you
精彩评论