Position item in the RadlistBox use "FindItem"

2 posts, 0 answers
  1. Alain Cabot
    Alain Cabot avatar
    4 posts
    Member since:
    Sep 2009

    Posted 08 Nov 2010 Link to this post

    I have a screen with a RadListBox where users are able to search through the list with a button and a search button below. The user enters the search value and fact find.
    I am able to find the right items with my search button and using the following method "FindItem" of control.

    My problem is that if I have a scrollbar because I have a lot of information in the list find the item is in the bottom of the list, the control does not set the list to see who is selected by programming .

    If it is not clear, I have an example I can send you.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 10 Nov 2010 Link to this post

    Hello Alain,

    Invoke the scrollIntoView() method of RadListBoxItem in order to put the item at the bottom of the visible area.

    Sample code:
    function searchItem() {
        var listBox = $find('<%= RadListBox2.ClientID  %>');
        var item = listBox.findItemByText("Mango"); // get the item

Back to Top