nim Posted May 29, 2013 Posted May 29, 2013 How to set UniDBGrid2.WebOptions.PageSize in runtime? Quote
Sherzod Posted May 30, 2013 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 Quote
knopix Posted May 30, 2013 Posted May 30, 2013 source is in place where in unidbgrid? helpme?Duser Regards Knopix Quote
Sherzod Posted May 30, 2013 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 Quote
nim Posted May 30, 2013 Author 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. Quote
knopix Posted May 31, 2013 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 Quote
nim Posted May 31, 2013 Author 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 Quote
Sherzod Posted June 3, 2013 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 Quote
Sistema Fenix Posted October 5, 2013 Posted October 5, 2013 duser, I know well the events of unigui. How do I include this component in my dbgrid? Best regards Quote
Sherzod Posted June 6, 2014 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/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.