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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...