Hi Sherly,
Thank you for using Syncfusion products.
In the GridDataBoundGrid Control, you cannot set cell specific properties like CellType, BackColor (other than CellValue or Text) using an indexer like this.gridDataBoundGrid[8,10].CellType = "ComboBox". The reason is that in GridDataBoundGrid, the only data storage is the bounded datasource. That only holds a single value. It does not hold CellType, Backcolor, or any of the other cell specific properties. So, in order to set cell specific properties like CellType in GridDataBoundGrid, you could handle the PrepareViewStyleInfo event or Model.QueryCellInfo event. Below is the code snippet:
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
{
if (e.ColIndex == 2 && e.RowIndex == 2)
{
StringCollection items = new StringCollection();
items.Add("Apple");
items.Add("Grapes");
items.Add("Banana");
items.Add("Mango");
items.Add("Cherry");
e.Style.CellType = "ComboBox";
e.Style.BackColor = Color.LightBlue;
e.Style.ChoiceList = items;
}
Please refer to the sample available in the link below and let me know if it helps:
http://websamples.syncfusion.com/samples/Grid.Windows/F71743FollowUp /main.htm
Regards,
Subhasheela R