PDA

View Full Version : Paginig toolbar page is not changing automatically



sachin sachdeva
26 Apr 2011, 2:03 AM
Hi..I want to change the page of paging toolbar automatically my code is


var comboboxpageNumber = combobox.pageTb.getPageData().activePage;

mainTabPanel.activate(0);
var result = modelStoreFunct.fn();

grid.getBottomToolbar().bind(result);
grid.reconfigure(result, columnModel);
grid.getBottomToolbar().changePage(comboboxpageNumber );// according to me it should change here




var modelStoreFunct = {
fn : function() {
var search = Ext.getCmp("searchclrid").getValue();
var dataStoreTree = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url : 'searchUsingKeyword.jsp?searchKeyword=' + search,
method : 'GET'
}),
reader : GlobalSearchReader,
autoLoad : {
params : {
start : 0,
limit : 10
}
}
});
return dataStoreTree;
}
};


Please let me know why i am not able to change the page......

drian
26 Apr 2011, 2:26 AM
i might be wrong, but getBottomToolbar returns the bbar, not the paging toolbar.

sachin sachdeva
26 Apr 2011, 2:45 AM
yes but my bbar is pagingtoolbar

friend
26 Apr 2011, 3:44 AM
Since you're dynamically reconfiguring the grid, you may have to call the PagingToolbar's 'bindStore(yourStore)' method.