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

DropDownbutton

3 Answers 80 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Hugues
Top achievements
Rank 1
Hugues asked on 16 Jan 2015, 12:10 AM
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.

3 Answers, 1 is accepted

Sort by
0
Hugues
Top achievements
Rank 1
answered on 16 Jan 2015, 12:26 AM
I have found a work around by overriding some of the events.

Thanks,
Jerome
0
Hugues
Top achievements
Rank 1
answered on 16 Jan 2015, 12:41 AM
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.
0
Hristo
Telerik team
answered on 20 Jan 2015, 04:39 PM
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.

 
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Hugues
Top achievements
Rank 1
Answers by
Hugues
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or