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

Keeping RadDropDownButton content on close

1 Answer 46 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Mrn
Top achievements
Rank 1
Mrn asked on 11 Aug 2011, 01:17 PM

Hi,

I have set a ListBox as a content for a RadDropDownButton, and I find that, after a user has selected an item from the list and clicks the button to close it, if she clicks again to re-open the list, her previous selection has been lost... I'd like to keep the same ListBox even if the user closes the button content, is there any way to achieve that?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 16 Aug 2011, 11:58 AM
Hello Mrn,

I am not sure if I understand your scenario correctly - do you display a ListBox as DropDownContent of the RadDropDownButton? If this is the case, if the ListBox.Items collection is populated in XAML then the selection should be kept even if the DropDownContent is closed and later opened.

If the ListBox is databound to a business collection of items, then in order to keep the selection, you will need to bind the ListBoxItem IsSelected property to a property from your view models.

I hope thins info will help you. However, if I am missing something or you need more info, please let me know.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
Buttons
Asked by
Mrn
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or