Whenever the user clicks on one of the group items on the WebExplorerBar, I could like to collapse any existing open groups on the client side using java script. Can anyone provide an example of how to do this on the Item Expanded event? I need code to get all open groups (other than one that was clicked) and collapse them.
Thanks in advance for any suggestions.
Hello Charles,
This is possible by looping through the groups in your WebExplorerBar and setting their expanded state. The following code demonstrates how you can achieve this in the client side ItemExpanded event. Please note that for this method to work properly each group should have a unique value.
var count = sender.getExplorerBarItems().get_length(); var newExpandItem = eventArgs.getExplorerBarItem(); for (var i = 0; i < count; i++) { var item = sender.getExplorerBarItems().getItem(i); if (item.get_value() != newExpandItem.get_value()) { item.set_expanded(false); } }
Please let me know if you have any questions concerning this matter.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
Thanks Mike, that worked perfectly!
One more question I have on the WebExplorerBar - is there something related to this component that always positions the page back to the top? We have maintainScrollPositionOnPostBack="true" but on this page it always jumps back to the top of the page everytime a menu item on the webexplorerbar is clicked, which makes the screen appear to be jumping around as they get to the lower menu items.