RadListBoxItem not visible

2 posts, 0 answers
  1. Jorge Delgado-Lopez
    Jorge Delgado-Lopez avatar
    82 posts
    Member since:
    Aug 2007

    Posted 27 Oct 2008 Link to this post

    Hi!

    I am adding RadListBoxItem(s) to a RadListBox at runtime and I need to scroll to view the last one added. When I set the last one to SelectedItem the RadListBox scrolls to the selected item but only the upper half of the item, I "solved" it before by adding an empty item at the end, but now it is not possible and I need a "real" fix. ScrollControlIntoView can't be used since it takes a Control and the Items are RadItem(s). Any ideas?

    Thanks,
    - jorge
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 28 Oct 2008 Link to this post

    Hello Jorge Delgado-Lopez,

    Thank you for contacting us.

    Please see whether the code snippet below can help you in this case:

    private void radButton1_Click(object sender, EventArgs e)  
    {  
                RadListBoxItem i = new RadListBoxItem();  
                i.Text = "item text";  
                this.radListBox1.Items.Add(i);  
                this.radListBox1.ListBoxElement.ScrollToBottom();  

    Do not hesitate to write me back if you have further questions.

    Greetings,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top