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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to define a Dropdown CheckedListBox Column?

Thread ID:





61999 Jun 6,2007 03:06 AM UTC Jun 8,2007 05:50 AM UTC WinForms 7
Tags: GridControl
Ken Xu
Asked On June 6, 2007 03:06 AM UTC

Hello, Please help me.

The following is code snippet,
DataTable dtAdType = service.GetAdType();
CheckedListBox clb = new CheckedListBox();
clb.DisplayMember = "NameChn";
clb.ValueMember = "ID";
clb.DataSource = dtAdType;
Syncfusion.Windows.Forms.Tools.ComboBoxBase cbb = new Syncfusion.Windows.Forms.Tools.ComboBoxBase();
cbb.FlatStyle = Syncfusion.Windows.Forms.Tools.ComboFlatStyle.System;
cbb.ListControl = clb;
grdGrouping.TableDescriptor.Columns["Forbid"].Appearance.AnyRecordFieldCell.CellType = "Control";
grdGrouping.TableDescriptor.Columns[Forbid"].Appearance.AnyRecordFieldCell.Control = cbb;
grdGrouping.TableDescriptor.Columns["Forbid"].Width = 100;
Code Problem1:If I click one option,the ListBox will dispear,I must re-open the listbox to select another.How can I hold on the listbox?
Code Problem 2:If I select more than one option,but the ComboBoxBase can only dispaly one option's value in its text area?If I can display them with a spliting sign?
code problem 3:I found the former record's selections will affect the last record's selections, actually, they're same complete.

What I want is to create a column that likes a ComboBox, and after clicking it, then will pop up a CheckedListBox.So I can Multi-Select.
Finnally, the most Important step is storing my selected option into database.You know, I can easily access database through coding, but I really don't know how to deal with the multi-data even if the problems are solved above.

Ken Xu
Replied On June 6, 2007 03:09 AM UTC

The Grid is GridGroupingControl.

haneefm [Syncfusion]
Replied On June 6, 2007 06:55 PM UTC

Hi Ken,

One way to do this would be to derive a custom cell type like the ones( \\windows\Grid.Windows\Samples\CustomCellTypes\DropDownFormAndUserControlSample). It requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell. Then to use your custom cell type in a grid, you need to register this celltype with the grid as shown in this sample.s\Syncfusion\Essential Studio\\windows\Grid.Windows\Samples\CustomCellTypes. Also the attached sample shows you "How to attach custom celltypes in a GroupingGrid?". It also implements the CheckedListControl as datasource. Please try the sample and let me know if this helps.

Sample : CustomCellTypeSample

Best regards,

Ken Xu
Replied On June 7, 2007 12:35 AM UTC

Thank you,hannef.

Oh,you know, my library's version is v2.x.
Please show me a method I can use, but I will practise with the way you list above in my situation.

Please help me~

Ken Xu
Replied On June 7, 2007 12:36 AM UTC

Thank you,hannef.

Oh,you know, my library's version is v2.x.
Please show me a method I can use, but I will practise with the way you list above in my situation.

Please help me~

Ken Xu
Replied On June 7, 2007 08:18 AM UTC

Sorry for my fuss, Haneef.

I have a glancing view on the sample project you attached, and I'm nearly sure it's Cross-version.
Please give some time to practise it into my project, if any question comes forth, I will put it to you here.


Ken Xu
Replied On June 7, 2007 10:11 AM UTC

Hello, Haneef

Troubles come back.
When I was writting the CellModel & CellRenderer referred to the sample, I find the most important two Classes(GridGenericControlCellModel & GridGenericControlCellRenderer) have many method/property not be included in my v2.x library.
How can I construct and finish my CustomCell with current condition?

Ken Xu
Replied On June 8, 2007 05:50 AM UTC

Excuse me,
If Haneef is busy,
anybody else can help me?


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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