Hello All,
I added a UltraWebListbar in my MasterPage. On click of Groups it expands and show the list of items inside the group, and on click of any item within the Group it will go to another page(using TargetUrl property.)But the Group which is clicked is not retained, it gets collapsed. It always shows the First group as expanded..... I want to keep the group which i clicked in expanded mode.
Hope i explained my problem properly.
Thanks in Advance.
I had a similar problem and used the above solution attempting to use session variables to set the active group and item upon page refresh. The group could be configured fine, but when I attempted to set the item the "AutoNavigateSelectedItem" property caused a loop that kept recursively loading the page. My solution was to configure this property on the list bar to "False" and then manually call a response.redirect at the time the list item was selected. Might not be the best solution, but...it works!
Code below:
'Code to select correct item and group on nav bar based on session variables stored at time nav bar is clickedIf Not Page.IsPostBack Then
Dim intNavSelectedGroupIndex As IntegerDim intNavSelectedItemIndex As IntegerintNavSelectedGroupIndex = Convert.ToInt32(Session("NavSelectedGroup"))intNavSelectedItemIndex = Convert.ToInt32(Session("NavSelectedItem")) Dim oSelectedGroup As Infragistics.WebUI.UltraWebListbar.Group = LeftNavMenu.Groups(intNavSelectedGroupIndex)Dim oSelectedItem As Infragistics.WebUI.UltraWebListbar.Item = oSelectedGroup.Items(intNavSelectedItemIndex)LeftNavMenu.SelectedGroup = intNavSelectedGroupIndexLeftNavMenu.SelectedItem = oSelectedItem
Dim oSelectedGroup As Infragistics.WebUI.UltraWebListbar.Group = LeftNavMenu.Groups(intNavSelectedGroupIndex)Dim oSelectedItem As Infragistics.WebUI.UltraWebListbar.Item = oSelectedGroup.Items(intNavSelectedItemIndex)LeftNavMenu.SelectedGroup = intNavSelectedGroupIndexLeftNavMenu.SelectedItem = oSelectedItem
End Sub
Session("NavSelectedGroup") = LeftNavMenu.SelectedGroupSession("NavSelectedItem") = LeftNavMenu.SelectedItem.Index
HI , sure use another session variable.
Hi Matt Traynor,
Thanks.,At last i am able to preserve and show the selected group expanded, now i need to show the Item that isClicked.
//Page_ Load code is below
{
wlRightMenu.Groups[Convert.ToInt32(Session[SELECTEDGROUP])].Expanded = true;
}
//Item clicked Event
Session[SELECTEDGROUP] = wlRightMenu.SelectedGroup;
Should i make use of another session variable to preserve the item clicked also?.... or any other way t o proceed.
Hi Sriram, send me a code snippet.
Hi,
Thank you so much for your reply.. On click of any item from group i store the clicked group id in a session variable in Master Page, and on PageLoad of child page, i find the listbar control in MasterPage and did UltraWebListbar1.Groups[x].Expanded = true; as u said, but still the first group is always shown expanded..... I am not able to find out what im doing wrong.....
Thanks,
Sriram