nim Posted May 29, 2013 Share Posted May 29, 2013 How to set UniDBGrid2.WebOptions.PageSize in runtime? Link to comment Share on other sites More sharing options...
Sherzod Posted May 30, 2013 Share Posted May 30, 2013 Hi nim. Try this newpageSize := '3'; UniSession.AddJS('MainForm.UniDBGrid2.getStore().pageSize = '+newpageSize+';'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().reload({params:{start:0, limit:'+newpageSize+'}});'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().loadPage(1);'); UniSession.AddJS('MainForm.UniDBGrid2.getView().refresh();'); Best regards 1 Link to comment Share on other sites More sharing options...
knopix Posted May 30, 2013 Share Posted May 30, 2013 source is in place where in unidbgrid? helpme?Duser Regards Knopix Link to comment Share on other sites More sharing options...
Sherzod Posted May 30, 2013 Share Posted May 30, 2013 source is in place where in unidbgrid? helpme?Duser For example: .... uses uniGUIApplication, .... .... procedure TMainForm.UniButton1Click(Sender: TObject); var newpageSize: String; begin newpageSize := '3'; UniSession.AddJS('MainForm.UniDBGrid2.getStore().pageSize = '+newpageSize+';'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().reload({params:{start:0, limit:'+newpageSize+'}});'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().loadPage(1);'); UniSession.AddJS('MainForm.UniDBGrid2.getView().refresh();'); end; Best regards Link to comment Share on other sites More sharing options...
nim Posted May 30, 2013 Author Share Posted May 30, 2013 Thank you very much, duser But it is not working. If so: For example: .... uses uniGUIApplication, .... .... procedure TMainForm.UniButton1Click(Sender: TObject); var newpageSize: String; begin newpageSize := '3'; UniSession.AddJS('MainForm.UniDBGrid2.getStore().pageSize = '+newpageSize+';'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().reload({params:{start:0, limit:'+newpageSize+'}});'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().loadPage(1);'); UniSession.AddJS('MainForm.UniDBGrid2.getView().refresh();'); end; Best regards then works. But I need this: DataSet.Open; newpageSize := '3'; UniSession.AddJS('MainForm.UniDBGrid2.getStore().pageSize = '+newpageSize+';'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().reload({params:{start:0, limit:'+newpageSize+'}});'); UniSession.AddJS('MainForm.UniDBGrid2.getStore().loadPage(1);'); UniSession.AddJS('MainForm.UniDBGrid2.getView().refresh();'); Thanks. Link to comment Share on other sites More sharing options...
knopix Posted May 31, 2013 Share Posted May 31, 2013 The code is written in the server where Nim what module, main module or in the mainform? thank you Regards Knopix Link to comment Share on other sites More sharing options...
nim Posted May 31, 2013 Author Share Posted May 31, 2013 The code is written in the server where Nim what module, main module or in the mainform? thank you Regards Knopix In the MainForm Regards Nim Link to comment Share on other sites More sharing options...
knopix Posted June 1, 2013 Share Posted June 1, 2013 Thank you very Much Mr.Nim Regards Knopix Link to comment Share on other sites More sharing options...
Sherzod Posted June 3, 2013 Share Posted June 3, 2013 Good plugin, to change the page sizehttp://loianegroner.com/extjs/examples/extjs4-ux-paging-toolbar-resizer/https://github.com/loiane/extjs4-ux-paging-toolbar-resizer Best regards Link to comment Share on other sites More sharing options...
Sistema Fenix Posted October 5, 2013 Share Posted October 5, 2013 duser, I know well the events of unigui. How do I include this component in my dbgrid? Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2014 Share Posted June 6, 2014 duser, I know well the events of unigui. How do I include this component in my dbgrid? Best regards http://forums.unigui.com/index.php?/topic/4210-pagesize-extension-for-unidbgrid/ Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now