iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Is there a way to disable a WebPane control? The WebPaneManager has a Disabled property which disables all of the panes but I have a need to disable a particular pane so the user cannot update any of the underlying controls.
By default, there is no property or methods that can be used to implement your specific scenario, to disable WebPane include underlying controls that located inside.
I’d like to offer a solution by using following Javascript function. Here is the scenario of the test page in my local end. There is a page that has a simple layout of WebPaneManager. In the “Header” pane, a WebCombo is added. Yet, an HTML button is added into the page. This button will be used to toggle the disable condition of the “Header” pane (include its underlying controls).
The idea is quite simple. First, get the div element of the content from the specific pane that we would like to disable/enable. Next, iterates through the childNodes of the content and set its disabled property to false or true.
function button1_onclick() { var WebPaneManager1 = ISGetObject("WebPaneManager1"); var divContainer = WebPaneManager1.RootGroupPane.Panes[0].GetContentDivElement(); toggleDisabled(divContainer); return true; } function toggleDisabled(el) { try { el.disabled = el.disabled ? false : true; } catch (E) { } if (el.childNodes && el.childNodes.length > 0) { for (var x = 0; x < el.childNodes.length; x++) { toggleDisabled(el.childNodes[x]); } } return true; }
I enclosed my test page as attachment. Please have the attach sample tested on your end and let us know whether it helps or not.
By default, there is no property or methods that can be used to implement your specific scenario, to disable WebPane include underlying controls that located inside.I’d like to offer a solution by using following Javascript function. Here is the scenario of the test page in my local end. There is a page that has a simple layout of WebPaneManager. In the “Header” pane, a WebCombo is added. Yet, an HTML button is added into the page. This button will be used to toggle the disable condition of the “Header” pane (include its underlying controls).The idea is quite simple. First, get the div element of the content from the specific pane that we would like to disable/enable. Next, iterates through the childNodes of the content and set its disabled property to false or true.function button1_onclick() { var WebPaneManager1 = ISGetObject("WebPaneManager1"); var divContainer = WebPaneManager1.RootGroupPane.Panes[0].GetContentDivElement(); toggleDisabled(divContainer); return true; } function toggleDisabled(el) { try { el.disabled = el.disabled ? false : true; } catch (E) { } if (el.childNodes && el.childNodes.length > 0) { for (var x = 0; x < el.childNodes.length; x++) { toggleDisabled(el.childNodes[x]); } } return true; }I enclosed my test page as attachment. Please have the attach sample tested on your end and let us know whether it helps or not.
Thank you. This works good. The only issue is that you get a JS error if you click on the Grid's FilterRow ARROW icon. That's not a big deal. Do you think there is a way to speed it up? Or is the only wat recursion?
Currently I have no better idea to implement such scenario or to speed it up.
About the JS error, could you please let us know in detail about how to reproduce the issue? You may modify my sent sample and let us know the step-by-step to reproduce the issue (include the version of the browser).
Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname