Jump to content

Update button uniDBGrid


Lena

Recommended Posts

 

2. Try:

UniDBGrid1 -> ....

 

 

 

Thank you very much!

 

1. It may help:

 

Sorry but I do not understand how can be updated uniDBGrid from javascript code.

function afterrender(sender, eOpts)
{
 sender.pagingBar.getComponent("refresh").handler = function () {
    //your custom logic...
    //UniMainModule().ClientDataSet1.Refresh(); ???
    alert("test");
  }
}
Link to comment
Share on other sites

Unfortunately it is not running.

I think the best option to hide this refresh button.

function afterrender(sender, eOpts)
{
  if (sender.pagingBar) {
    sender.pagingBar.getComponent("refresh").hide()
  }
}

And then make a separate button on the form with code refresh ClientDataSet.

Link to comment
Share on other sites

Hi.

 

Try:

1.
UniDBGrid1 -> ....
function afterrender(sender, eOpts)
{
  sender.pagingBar.getComponent("refresh").handler = function () {
    ajaxRequest(MainForm.window, 'Grid1Refresh', []);
  }
}

 

2.
MainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
 if EventName='Grid1Refresh'
 then UniMainModule.ClientDataSet1.Refresh;
end;

Link to comment
Share on other sites

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...