Jump to content

Recommended Posts

Posted

Hi.
I have two questions on the update button.
1. What event in the Object Inspector occurs when I press this button?
2. How to make this button invisible?
Thanks.

 

post-32-0-76055000-1435656148_thumb.jpg

Posted

 

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");
  }
}
Posted

Try:

function afterrender(sender, eOpts)
{
  sender.pagingBar.getComponent("refresh").handler = function () {
    //your custom logic...
    sender.getStore().load();
  }
}
Posted

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.

Posted

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;

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