Lena Posted June 30, 2015 Share Posted June 30, 2015 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. Link to comment Share on other sites More sharing options...
Sherzod Posted June 30, 2015 Share Posted June 30, 2015 Hi, 1. It may help: http://forums.unigui.com/index.php?/topic/4425-grid-refresh-button/&do=findComment&comment=21879 2. Try: UniDBGrid1 -> .... function afterrender(sender, eOpts) { if (sender.pagingBar) { sender.pagingBar.getComponent("refresh").hide() } } Best regards! Link to comment Share on other sites More sharing options...
Lena Posted June 30, 2015 Author Share Posted June 30, 2015 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 More sharing options...
Sherzod Posted June 30, 2015 Share Posted June 30, 2015 Try: function afterrender(sender, eOpts) { sender.pagingBar.getComponent("refresh").handler = function () { //your custom logic... sender.getStore().load(); } } Link to comment Share on other sites More sharing options...
Lena Posted June 30, 2015 Author Share Posted June 30, 2015 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 More sharing options...
aln02 Posted July 1, 2015 Share Posted July 1, 2015 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 More sharing options...
Lena Posted July 2, 2015 Author Share Posted July 2, 2015 Thank you very much! I will try your code in C++ Builder XE7. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now