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

MultiRowRecord with GridDataBoundGrid and Celltypes: DropDownBox

Thread ID:





58188 Mar 20,2007 02:48 PM UTC Mar 21,2007 09:02 AM UTC WinForms 2
Tags: GridControl
Asked On March 20, 2007 02:48 PM UTC

I have studied the examples
1. MultiRowRecord with the GridDataBoundGrid
2. Celltypes DropDown in the GridControl

Is ist possible to change the celltypes in the GridDataBound to a DropDownBox? I want a MultiRowRecord with one DropDownbox in one cell.

I have already tried this:

DataTable dt;
private void Form1_Load(object sender, System.EventArgs e)

DataColumn column;

column = new DataColumn();
column.DataType = System.Type.GetType("System.String");

column = new DataColumn();
column.DataType = System.Type.GetType("System.String");

DataRow dr = dt.NewRow();
dr[1] = "One";
dr[0] = "One";


this.gridDataBoundGrid1.DataSource = dt;

StringCollection items = new StringCollection();

gridDataBoundGrid1[1, 1].CellType = "ComboBox";
gridDataBoundGrid1[1, 1].ChoiceList = items;

but it does not work.
Thanx for any help!

Administrator [Syncfusion]
Replied On March 20, 2007 04:23 PM UTC

Hi Xerxos,

By default, DataBoundGrid doesn't store any style info properties. You can not set any cell or row specific properties for the DataBoundGrid other than the CellValue. You need to handle the PrepareViewStyleInfo (or Model.QueryCellInfo) Event to do this. Through this event you can set the style properties for the grid.

To set the CellType for a cell, you check for the e.RowIndex/e.ColIndex, if that points to the row you desired, set the e.Style.CellType for it.

e.Style.CellType = "ComboBox";
e.Style.ChoiceList = items;

See the KnowledgeBase Articles for more info.
QueryCellInfo event : http://www.syncfusion.com/Support/article.aspx?id=10351
PrepareViewStyleInfo event :http://www.syncfusion.com/Support/article.aspx?id=560


Administrator [Syncfusion]
Replied On March 21, 2007 09:02 AM UTC

Thank you very much, it works fine now! ;)


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