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
1615
UltraWebListbar - maintain scroll, hover effects
posted

Working in version 9.2 in .net 2008. Using a ultraweblistBar that I programmatically populate the groups and also the items at runtime. If item list requires scrollbar and an item selected down in the list, the control postbacks to populate a grid but the scrollbar goes back to the top item within the group. Any code or setting to keep the scrollbar position after a postback?

I also set the Hover and SelectedItem settings to show a background color. When an item is selected the background color shows fine but when you hover the mouse over it again the background color disappears and does not go back to the selected color after moving off of the item that was selected. Is this a bug or is there a setting for this?

 

Thanks

Parents
No Data
Reply
  • 49378
    posted

    Hi jcom39201,

    It should be possible to persist the scrolling position for the selected group in UltraWebListbar using some custom code. Here is my suggestion for implementing this:

            function UltraWebListbar1_InitializeListbar(oListbar, oEvent) {

                var selectedIndex = iglbar_getListbarById("UltraWebListbar1").SelectedGroup.i;
                document.getElementById("UltraWebListbar1_Items_" + selectedIndex).scrollTop = document.getElementById("HiddenField1").value;
            }

            function postbackHandler() {
                var selectedIndex = iglbar_getListbarById("UltraWebListbar1").SelectedGroup.i;
                document.getElementById("HiddenField1").value = document.getElementById("UltraWebListbar1_Items_" + selectedIndex ).scrollTop;
            }

    The HiddenField element is placed on the page and its function is to set the scrollTop position after a postback. Please note that in order for this to work when a postback is initiated,  the HiddenField's value needs to be updated.

    As per your second questions: I tested setting the DefaultItemHover and DefaultItemSelectedStyle's BackColor and it seems to be applied as expected (i.e. mouse hover is not removing the selected color). Attached is my working sample.

    Please tell me if this helps.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://ko.infragistics.com/support

Children