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

grid cell controls

Thread ID:





50993 Oct 25,2006 03:23 PM UTC Oct 26,2006 05:56 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 25, 2006 03:23 PM UTC


is there a way in a GridDataBoundGrid to have different cells of the same column have a different control, i.e. one free text box and another a combo box?

Administrator [Syncfusion]
Replied On October 26, 2006 05:56 AM UTC

Hi Charbel,

The attached sample shows you how to put different controls into same column in a grid. You will learn how to put pushbutton’s, comboboxes and textboxes into cells. You can handle the Model_QueryCellInfo event of the grid model and set the e.Style.CellType to some new control to want to display. Below is a code snippet.

private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
if( e.ColIndex == 3 && e.RowIndex > 0 )
switch(e.RowIndex % 3)
case 0://ComboBox
e.Style.CellType = "ComboBox";
e.Style.BackColor = Color.AliceBlue;
e.Style.DataSource = GetChildTable();
e.Style.ValueMember = "Name";
case 1://Button CellType
e.Style.CellType = "PushButton";
e.Style.Description = e.Style.Text;
e.Style.Themed = true;
e.Style.BackColor = Color.Red;

Here is Sample.

Best Regards,


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