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
799
Moving dropdown to current value
posted

I'm continueing with a problem found in

http://es.infragistics.com/community/forums/t/76517.aspx

I've implemented the solution, but when I open the dropdown, my entire content of my tab moves up.

(see printscreen)

What can i check to resolve this?

Parents
  • 29417
    Verified Answer
    Offline posted

    Hello Razieltje ,

     

    Thank you for posting in our forum.

     

    Are there perhaps any other scrollbars on the page?

    The scrollIntoView() might be affecting them as well. 

    To scroll only the container you could do something like this: 

    function wdd1_opened(sender, e) {
              var selected = sender.get_selectedItem();
              var container = sender._elements.DropDownContents;
              var offset = $(container).first().position().top;
              if (selected != null) {
                  $(container).scrollTop(0);
                  var childElement = selected.get_element();
                  var top = $(childElement).position().top - offset;
                  $(container).scrollTop(top);
              }
           
          }

     

    This uses the jQuery’s scrollTop method. Since we call this only on the parent container it shouldn't affect anything else on the page.

    Let me know if you need further assistance with this.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://es.infragistics.com/support

     

Reply Children
No Data