Israel Portillo Posted November 27, 2020 Share Posted November 27, 2020 HI group I have a design panel with a ClientEvents->UniEvents->beforeinit JS code as: function beforeInit(sender, config) { config.cls = "myrow"; } How can I assign the same property in a runtime created panel ? Thanks for your help. Link to comment Share on other sites More sharing options...
irigsoft Posted November 28, 2020 Share Posted November 28, 2020 8 hours ago, Israel Portillo said: HI group I have a design panel with a ClientEvents->UniEvents->beforeinit JS code as: function beforeInit(sender, config) { config.cls = "myrow"; } How can I assign the same property in a runtime created panel ? Thanks for your help. Hi, I use this when create button at runtime: MyButton.ClientEvents.ExtEvents.Values['beforeInit'] := 'function beforeInit (sender, config) {sender.listeners = {initialize: function(editor) {var styles = {"word-wrap": "break-word"};Ext.DomHelper.applyStyles(editor.getEditorBody(), styles);}}}'; Link to comment Share on other sites More sharing options...
bdiri Posted November 28, 2020 Share Posted November 28, 2020 Hi maybe this can help you UniPanel1.ClientEvents.UniEvents.Values['beforeInit'] := 'function (sender, config) {config.cls="myrow"}'; Link to comment Share on other sites More sharing options...
Sherzod Posted November 28, 2020 Share Posted November 28, 2020 12 hours ago, Israel Portillo said: How can I assign the same property in a runtime created panel ? Hello, Also you can use: UniPanel.JSInterface.JSConfig('cls', ['myrow']); Link to comment Share on other sites More sharing options...
Israel Portillo Posted December 2, 2020 Author Share Posted December 2, 2020 Solved.... Thanks again group. 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