mos Posted October 7, 2020 Share Posted October 7, 2020 I have created a pagingbar button using the following code: function pagingBar.boxready(sender, width, height, eOpts) { this.add([ '-', { xtype: "button", text: 'More Records', width: 100, id: "moreRecsBtn", listeners: { click: function() { ajaxRequest(sender, "_moreRecs", []); } } } ]); } In the OnAjaxEvent of the DBGrid I have the following code which is suppose to change the text color of the button when it's clicked but it doesn't: if EventName = '_moreRecs' then UniSession.AddJS('Ext.getCmp("moreRecsBtn").setStyle(' + '''' + 'color' + '''' + ',' + '''' + 'red' + '''' + ');'); How can I change the text color of the button? Link to comment Share on other sites More sharing options...
Sherzod Posted October 7, 2020 Share Posted October 7, 2020 8 hours ago, mos said: Ext.getCmp("moreRecsBtn") Hello, Try using this instead: Ext.select("#moreRecsBtn .x-btn-inner") Link to comment Share on other sites More sharing options...
mos Posted October 8, 2020 Author Share Posted October 8, 2020 Hi Sherzod, Thanks that worked. However I have found an issue which I have attached a project which illustrates the problem. In the example I have a PageControl which has two DBGrids which both have the More Records custom button. The issue is when I click on the UniTabSheet2 tab cross icon to close the tab sheet the More Records button disappears in the UniTabSheet1 DBGrid. Example.zip Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 6 hours ago, mos said: The issue is when I click on the UniTabSheet2 tab cross icon to close the tab sheet the More Records button disappears in the UniTabSheet1 DBGrid. Hi, First of all, you can solve the problem by assigning different IDs. 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