Israel Portillo Posted November 27, 2020 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
irigsoft Posted November 28, 2020 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
bdiri Posted November 28, 2020 Posted November 28, 2020 Hi maybe this can help you UniPanel1.ClientEvents.UniEvents.Values['beforeInit'] := 'function (sender, config) {config.cls="myrow"}'; Quote
Sherzod Posted November 28, 2020 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
Israel Portillo Posted December 2, 2020 Author Posted December 2, 2020 Solved.... Thanks again group. Quote
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.