How to display checkbox in a combobox with Syncfusion controls without using System.Windows controls?

I'm trying to build a control that displays the list of months of the year in a combobox and the user can choose from several months via a checkbox associated with each element of the month, and then take the id's of the selected months and work them into my application. 

I saw an example of this is the dashboard of Syncfusion, but is a checkedlistbox of System.Windows associated with a comboboxadv . 
But I need it to be purely a control made ​​with Syncfusion resources.

Thanks and regards.

2 Replies

ST Saravanan T Syncfusion Team June 26, 2014 01:58 PM UTC

Hi Juan,

Thank you for using Syncfusion Product, 

We would like to let you know that, your requirement for using checkbox in a ComboBox dropdown can be achieved by using ComboBoxDropDown and TreeViewAdv as its drop down.

Code Snippet:

//To set TreeViewAdv as ComboBox DropDown

this.comboDropDown1.PopupControl = this.treeViewAdv1;

this.comboDropDown1.Size = new System.Drawing.Size(121, 21);

this.comboDropDown1.TabIndex = 5;

 

//To enable CheckBox

this.treeViewAdv1.ShowCheckBoxes = true;

this.treeViewAdv1.ShowFocusRect = true;

this.treeViewAdv1.ShowLines = false;

this.treeViewAdv1.ShowPlusMinus = false;

this.treeViewAdv1.Size = new System.Drawing.Size(121, 129);

this.treeViewAdv1.Style = Syncfusion.Windows.Forms.Tools.TreeStyle.Default;

this.treeViewAdv1.TabIndex = 6;

this.treeViewAdv1.Text = "treeViewAdv1"; 


We have prepared a sample for your requirement and it is attached below.


Please let us know if you need any further assistance,

 

Regards,

T.Saravanan


Attachment: Treeview5_2ad25dba.zip


JZ Juan Zavala replied to Saravanan Thirunavukkarasu June 26, 2014 05:46 PM UTC

Hi Juan,

Thank you for using Syncfusion Product, 

We would like to let you know that, your requirement for using checkbox in a ComboBox dropdown can be achieved by using ComboBoxDropDown and TreeViewAdv as its drop down.

Code Snippet:

//To set TreeViewAdv as ComboBox DropDown

this.comboDropDown1.PopupControl = this.treeViewAdv1;

this.comboDropDown1.Size = new System.Drawing.Size(121, 21);

this.comboDropDown1.TabIndex = 5;

 

//To enable CheckBox

this.treeViewAdv1.ShowCheckBoxes = true;

this.treeViewAdv1.ShowFocusRect = true;

this.treeViewAdv1.ShowLines = false;

this.treeViewAdv1.ShowPlusMinus = false;

this.treeViewAdv1.Size = new System.Drawing.Size(121, 129);

this.treeViewAdv1.Style = Syncfusion.Windows.Forms.Tools.TreeStyle.Default;

this.treeViewAdv1.TabIndex = 6;

this.treeViewAdv1.Text = "treeViewAdv1"; 


We have prepared a sample for your requirement and it is attached below.


Please let us know if you need any further assistance,

 

Regards,

T.Saravanan


Attachment: Treeview5_2ad25dba.zip

THANKS SARAVANAN, THIS SAMPLE IS PERFECT.
THANK YOU VERY MUCH.
EXCELENT ANSWER.

Loader.
Up arrow icon