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

DropDownGridListControl in a grid column

Thread ID:





20586 Oct 21,2004 10:39 AM UTC Oct 21,2004 02:47 PM UTC WinForms 5
Tags: GridControl
Eddy Poullet
Asked On October 21, 2004 10:39 AM UTC

hi, I want set in a GridDataBoundGrid (with a multi-row layout) a column as DropDownGrisListControl in code. I have tried this code but I have not button that appear on it. GridBoundColumnsCollection b = this.grdBen.Binder.GridBoundColumns ; GridBoundColumn cmb = b["GrpID"]; cmb.StyleInfo.CellType = "DropDownGridListControl"; GrpBySocList grpList = GrpBySocList.GetCollection(coll.Soc.SocID); cmb.StyleInfo.DropDownStyle = GridDropDownStyle.Exclusive; cmb.StyleInfo.DataSource = grpList; cmb.StyleInfo.DisplayMember = "Libelle"; cmb.StyleInfo.ValueMember = "GrpId"; Thanks, Eddy POULLET Brussels

Administrator [Syncfusion]
Replied On October 21, 2004 11:41 AM UTC

These may be typos but: >>GridBoundColumnsCollection b = this.grdBen.Binder.GridBoundColumns ; >>cmb.StyleInfo.CellType = "DropDownGridListControl"; try GridBoundColumnsCollection b = this.grdBen.GridBoundColumns ; //unless you have not added GBC, in which case use grid.Binder.InternalColumns cmb.StyleInfo.CellType = "GridListControl";

Eddy Poullet
Replied On October 21, 2004 12:07 PM UTC

Thanks a lot. It works. How can I access the gridlistcontrol ? Can I add my self the column to the gridlistcontrol to have more controls to the order, header ,width, etc... Eddy

Administrator [Syncfusion]
Replied On October 21, 2004 01:10 PM UTC

It is not easy to customize this embedded GridListControl. You can access it with code like this. GridDropDownGridListControlCellRenderer cr = (GridDropDownGridListControlCellRenderer) this.gridControl1.CellRenderers["GridListControl"]; // cr.ListControlPart is the GridListControl Once you have the GridListControl, you can access the embedded GridControl, the Grid property of the GridListControl. But this Grid is virtually bound to the DataSource, so this means just setting style properties on individual cells will not work.

Eddy Poullet
Replied On October 21, 2004 01:44 PM UTC

Thanks Clay, But it''s a little pity that it''s not possible to have control on this "grid". I believe that this celltype is not very useful. Maybe exists it an another "easy :)" mean to have the same result? Eddy

Administrator [Syncfusion]
Replied On October 21, 2004 02:47 PM UTC

You can drop down a grid as in Grid\Samples\In Depth and make it look like a ListBox by hiding row headers and setting ListBoxSelectionMode.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon