Jump to content

Recommended Posts

Posted

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

  • Upvote 1
Posted

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

Posted

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.

 

 

 

 

 

Posted

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

  • 4 months later...
  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...