Hi all,
How do I change the graphic or even set a specific CSS class for disabled items on a webdatamenu? If I set a button to be disabled, i can see the hover doesn't work and button cannot be clicked, that's fine, but we need to give or users a visual indication of which buttons are disabled, so like the ultrawebtoolbar used to have it would be nice to have a .DIsabledImage property on each .Item, how do we achieve the same effect in the WebDataMenu please?
Hi bartond31,
Thank you for posting on our forums!
After looking into this, there does not appear to be a property among the WebDataMenu or its items that specifies a DisabledCssClass. I did find a property to set your own CSS class on an item and this can be used with some code to set the style when the item is disabled.
I've attached a sample that demonstrates how I went about setting this up in C# and javascript.
If you have any further questions with this, please let me know.
Please let me know if you need further assistance with this issue and I'll be glad to help you.
Yes please, can you tell me how do you enable + disable webdatamenu items from javascript? in the ultrawebtoolbar we could just call setEnabled, but I see no way in doing this to items in WebDataMenu?
Thanks
It is possible to enable and disable the items with their set_enabled function. Passing the first argument of true will enable the item, and passing false will disable it. After a quick look, this property doesn't seem to appear in our documentation and the function does exist on the items.
Please see below for an example of this function:
menu.getItems().getItem(0).set_enabled(false);
If you need anything else, feel free to let me know.
Please let me know if I can provide any further assistance with this issue.