This is a migrated thread and some comments may be shown as answers.

RadListBoxItem not visible

1 Answer 105 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
superold
Top achievements
Rank 1
superold asked on 27 Oct 2008, 07:47 PM
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

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 28 Oct 2008, 04:53 PM
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.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
superold
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or