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. Image for the cookie policy date

How to define a Dropdown CheckedListBox Column?

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.

7 Replies

KX Ken Xu June 6, 2007 03:09 AM UTC

Supplement:
The Grid is GridGroupingControl.


HA haneefm Syncfusion Team 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( \4.4.0.49\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\4.4.0.49\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,
Haneef


KX Ken Xu 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~


KX Ken Xu 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~


KX Ken Xu 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.

yours,
Ken


KX Ken Xu 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?


KX Ken Xu June 8, 2007 05:50 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon