Israel Portillo 2 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. Quote Link to post Share on other sites
irigsoft 5 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);}}}'; Quote Link to post Share on other sites
bdiri 13 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"}'; Quote Link to post Share on other sites
Sherzod 1132 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']); Quote Link to post Share on other sites
Israel Portillo 2 Posted December 2, 2020 Author Share Posted December 2, 2020 Solved.... Thanks again group. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.