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

RadMenuComboItem and Databinding

5 Answers 211 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 19 Oct 2012, 05:27 PM
I have a RadMenu with a sub RadMenuComboItem that I would like to DataBind to.  Under the childen collection//RadDropDownList Element - Datasource is greyed out in the editor and if I try the following the code, it runs but nothing is populated in the Combobox. 

this.radMenuComboTheme.ComboBoxElement.BindingContext = this.BindingContext;
this.radMenuComboTheme.ComboBoxElement.DataMember = "Theme_Name";
this.radMenuComboTheme.ComboBoxElement.ValueMember = "Theme_Value";
this.radMenuComboTheme.ComboBoxElement.DataSource = applicationThemes;

According to the documentation :

The RadMenuComboItem allows you to put a drop-down list on a menu. To add items to the combo box work with the Items collection of the RadMenuComboItem.ComboBoxElement property. Because the ComboBoxElement returns a RadDropDownListElement, you can also use data binding to put items in the drop-down list from any data source.

What am I missing?

5 Answers, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 1
answered on 19 Oct 2012, 06:44 PM
So above there is a type o' should say this.radMenuComboTheme.ComboBoxElement.DisplayMember not DataMember.  Even fixing this the drop down is still blank.  I have tried every thing I can think of and just don't get why it is not populating.
0
Accepted
Scott
Top achievements
Rank 1
answered on 19 Oct 2012, 06:59 PM
I figured out the issue - when I added the dataset to the form it did not create a Table Adapter - Once I got that configured data now binds and loads the drop down.
0
Stefan
Telerik team
answered on 23 Oct 2012, 10:03 AM
Hello Scott,

I am glad to hear that everything is now OK with this case. Could you please provide me with a link where the DataMember and DisplayMemeber are misplaced, so I can check it and log it if needed.

Regards,
Stefan
the Telerik team
You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
0
Scott
Top achievements
Rank 1
answered on 23 Oct 2012, 02:44 PM
It was my type'o on my end in the post.  Nothing to correct.
Thanks...
0
Stefan
Telerik team
answered on 23 Oct 2012, 02:49 PM
Great. Let us know if you have any other questions.

Greetings,
Stefan
the Telerik team
You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
Tags
Menu
Asked by
Scott
Top achievements
Rank 1
Answers by
Scott
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or