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. Quote 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);}}}'; Quote 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"}'; Quote 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']); Quote 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. Quote Link to comment Share on other sites More sharing options...
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.