DropDownbutton

4 posts, 0 answers
  1. Hugues
    Hugues avatar
    54 posts
    Member since:
    Sep 2014

    Posted 15 Jan 2015 Link to this post

    Is it possible to insert a custom user control in the dropdown of a button. It seems like i can only insert RadItems.

    Thanks,
    Jerome.
  2. Hugues
    Hugues avatar
    54 posts
    Member since:
    Sep 2014

    Posted 15 Jan 2015 Link to this post

    I have found a work around by overriding some of the events.

    Thanks,
    Jerome
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Hugues
    Hugues avatar
    54 posts
    Member since:
    Sep 2014

    Posted 15 Jan 2015 in reply to Hugues Link to this post

    I though i had fix but it is still not working. So if there is a solution i would definitely like to know what i need to do. This is
    very important as we have a release comming up soon.

    Thanks,
    Jerome.
  5. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 20 Jan 2015 Link to this post

    Hello Jerome,

    Thank you for writing.

    You would need to wrap your user control in a RadHostItem object. Please see my example below:
    public Form1()
    {
        InitializeComponent();
     
        MyUserControl control = new MyUserControl();
        RadHostItem item = new RadHostItem(control);
        item.MinSize = new System.Drawing.Size(this.radDropDownButton1.Width, 500);
        this.radDropDownButton1.Items.Add(item);
    }

    I hope this information is useful. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top