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.
Unfortunately, activation email could not send to your email. Please try again.

How to define a Dropdown CheckedListBox Column?

Thread ID:

Created:

Updated:

Platform:

Replies:

61999 Jun 5,2007 11:06 PM Jun 8,2007 01:50 AM Windows Forms 7
loading
Tags: GridControl
Ken Xu
Asked On June 5, 2007 11:06 PM

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 5, 2007 11:09 PM

Supplement:
The Grid is GridGroupingControl.

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

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

Ken Xu
Replied On June 6, 2007 08:35 PM

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 6, 2007 08:36 PM

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 04:18 AM

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

Ken Xu
Replied On June 7, 2007 06:11 AM

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 01:50 AM

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

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.

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.

;