RadMenuComboItem and Databinding

6 posts, 1 answers
  1. Scott
    Scott avatar
    16 posts
    Member since:
    Sep 2012

    Posted 19 Oct 2012 Link to this post

    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?
  2. Scott
    Scott avatar
    16 posts
    Member since:
    Sep 2012

    Posted 19 Oct 2012 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Scott
    Scott avatar
    16 posts
    Member since:
    Sep 2012

    Posted 19 Oct 2012 Link to this post

    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.
  5. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 23 Oct 2012 Link to this post

    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.
  6. Scott
    Scott avatar
    16 posts
    Member since:
    Sep 2012

    Posted 23 Oct 2012 Link to this post

    It was my type'o on my end in the post.  Nothing to correct.
    Thanks...
  7. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 23 Oct 2012 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready