I am currently using Flexigrid which is great. However when i am on say page 8 of a particular list of books then i change to another set of books which has less than 8 pages, the Flexigrid loads Page 8 with nothing on it...
I am just wondering how to reset the 'page' value to 1. I have tried:
$("#books").flexOptions({ url: '/books/list', params: [{ name:'bookId', value: $('#Books').val()}, {name:'fromDate', value: $('#fromDate').val()}, {name: 'toDate', value: $('#toDate').val()}]}).flexReload({ page: 1 });
and
$("#books").flexOptions({ page: 1, url: '/books/list', params: [{ name:'bookId', value: $('#Books').val()}, {name: 'fromDate', value: $('#fromDate').val()}, {name: 'toDate', value: $('#toDate').val()}]}).flexReload();
Any help is much appreciated.
I am currently using Flexigrid which is great. However when i am on say page 8 of a particular list of books then i change to another set of books which has less than 8 pages, the Flexigrid loads Page 8 with nothing on it...
I am just wondering how to reset the 'page' value to 1. I have tried:
$("#books").flexOptions({ url: '/books/list', params: [{ name:'bookId', value: $('#Books').val()}, {name:'fromDate', value: $('#fromDate').val()}, {name: 'toDate', value: $('#toDate').val()}]}).flexReload({ page: 1 });
and
$("#books").flexOptions({ page: 1, url: '/books/list', params: [{ name:'bookId', value: $('#Books').val()}, {name: 'fromDate', value: $('#fromDate').val()}, {name: 'toDate', value: $('#toDate').val()}]}).flexReload();
Any help is much appreciated.
Share Improve this question asked Apr 16, 2012 at 6:45 Mr-DCMr-DC 8695 gold badges15 silver badges29 bronze badges2 Answers
Reset to default 6newp : 1
is the trick here.
$('#MyFlex')
.flexOptions({
url: urlAction,
newp: 1
}).flexReload();
What you can do is simply locate the "First" button and trigger the click event on it. So let's say your table is contained into an div with an id of container (it's good to target a context if you have multiple tables grid)
$('#container .pFirst').click();
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745427107a4627229.html
评论列表(0条)