Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
UltraWebListbar not retaining position when item is clicked
posted

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.

Parents
  • 28407
    posted

    HI Sriram81,

    Since you are using Master pages, when you click on an item with a targeturl set, you are rendering a complete new page and this new page does not know what  group/item was clicked on in the prior page.

       So what you could do is used a query string. For each Item in a group - append a query string of the group that the item belongs to the item's targeturl. 

    So for the first group and its items

    set the item's targeturl to "Default2.aspx?group=0

    Then in the page_load event of Default2.aspx retrieve the query string with int x = (int) Request.QueryString["group"].

    Once you have the the group number you can expand that weblistbar's group  with the following line of code

    UltraWebListbar1.Groups[x].Expanded = true;

     

     

Reply Children