I am using the webexplorerbar as my menu on a master page, which is loading from an xml file
My issue is that if the user clicks the last displayed item (Level 1), the menu expands, but the user has to scroll down to see the explanded list (of level 2 items):
http://samples.infragistics.com/aspnet/Samples/WebExplorerBar/Display/ClientAPI/Default.aspx?cn=explorer-bar&sid=dae3fc67-3b5a-4872-8ed2-7b4b2b36ab9a
Is there a way of programatically scrolling the list down so that the expanded list is displayed, or at least some of it is displayed?
Hello lorettac242,
I am looking into this matter of programmatically scrolling the list so the newly expanded items are displayed.
I will give you a progress update by the end of the day Wednesday.
Sincerely,Mike P.Developer Support EngineerInfragistics, Inc.www.infragistics.com
Hello loretta242,
I have created and attached a sample to demonstrate how to achieve this. Using the client side ItemExpanded event of the WebExplorerBar I gain access to the child items of the group that was expanded and get the anchor element of the last child. After you have the anchor element you can use focus or scrollIntoView to show the newly expanded items.
Please let me know if you have any questions concerning this matter.
Hello Lorettac242,
I am following up to see if this issue is resolved.
If this isn’t the case please let me know if I may be of further assistance with this matter.
Hi Mike,
I am using multiple (up to 3) levels in the Web Explorer Bar, although not all menu options have 3 levels. I also have my menu set so that more than one menu group (not explorer group) can be explanded at the same time. This seems to cause problems with the code sample that you provided, as it seems to anchor on the the first expanded group, the the one that is being selected (which could be the 2nd or 3rd expanded item).
I am using scrollIntoView (as per your original example).
I have just returned from leave, and will be working on this this week.
I have modified my sample to have up to 3 levels of items in the WebExplorerBar. I am unable to reproduce the behavior you are experiencing. When I expand an item if the item has children that would expand beyond the bottom of the page they are scrolled into view using either the scrollIntoView or focus functions.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 11.2.20112.1019 in NetAdvantage for ASP.NET 2011 Volume 2.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
I have looked further into the sample and if when you call scrollIntoView you pass in false instead of true it will scroll the last item in the expanded item to the bottom of the screen instead of the top. This may help some with the jumping. In theory another way you could do this is if you can find the scroll position you can edit the scroll position over time to make it a smoother scroll.
As for having an expand behavior for item in the group this has been determined to be a feature request. I have logged this as a feature request FR13909. In theory you could also achieve this by looping through all the items in the group and making sure only one is expanded.
Please let me know if I may be of further assistance with this matter.
Thanks for all of you help with this issue. I am still not able to gett scrolling working to my satisfaction. The fact that I am using the menu with in a Master page to load Content pages, means that I am doing postback with almost all menu clicks. This is not helping the scrolling situation at all. I will wait and see if the feature request comes to fruition.
Thanks for you assistance.