We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multicolumncombobox and checkbox

Thread ID:

Created:

Updated:

Platform:

Replies:

53601 Dec 15,2006 11:49 PM UTC Dec 26,2006 05:22 PM UTC WinForms 2
loading
Tags: Tools
Keyur Patel
Asked On December 15, 2006 11:49 PM UTC

How do I make one of the columns in the drop-down of my multicolumncombobox a checkbox? I have tried this, but it doesn't seem to work:

this.McbSource.ListBox.Grid.Model.ColStyles[3].CellType = "CheckBox";
this.McbSource.ListBox.Grid.Model.ColStyles[3].CheckBoxOptions.CheckedValue = "1";
this.McbSource.ListBox.Grid.Model.ColStyles[3].CheckBoxOptions.UncheckedValue = "0";

Anupama Roy [Syncfusion]
Replied On December 18, 2006 05:06 AM UTC

Hi Keyur,

Thank you for your interest in Syncfusion products.

MultiColumnComboBox uses the GridListControl internally and as it is a non editable grid it will have some limitations though it supports cell types.You need to handle the internal Grid's PrepareViewStyleInfo event in order to have a CheckBox as your cell type.


this.MultiColumnComboBox1.ListBox.Grid.PrepareViewStyleInfo +=new Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventHandler(Grid_PrepareViewStyleInfo);
private void Grid_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
if( e.RowIndex == 3 && e.ColIndex == 1)
{

e.Style.CellType ="CheckBox";
e.Style.CheckBoxOptions.CheckedValue="1";
e.Style.CheckBoxOptions.UncheckedValue ="0";
e.Style.CellValueType=typeof(bool);
e.Style.CellValue="1";
e.Style.Description="asha";


}


}





Please have a look at the sample attached and kindly let me know if you need further assistance.

Best regards,

Anu.





Keyur Patel
Replied On December 26, 2006 05:22 PM UTC

This worked. Thank you.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;