Drop down cells

Hi, I need to set the cells of a row, for all columns, to be Combo-box. All the examples metion setting cells of a specific column to Combo-box Is there a way to achieve this? Regards, Rishi

1 Reply

AD Administrator Syncfusion Team April 15, 2005 09:00 PM UTC

Hi Rishi, you can handle the QueryCellStyleInfo event and change the cell-type for any cell at runtime by setting e.Style.CellType = "ComboBox"; Example: this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo); private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) { switch (e.TableCellIdentity.TableCellType) { case GridTableCellType.AlternateRecordFieldCell: case GridTableCellType.AddNewRecordFieldCell: case GridTableCellType.RecordFieldCell: { GridTable table = e.TableCellIdentity.Table; string tableName = table.TableDescriptor.Name; GridRecord record = (GridRecord) e.TableCellIdentity.DisplayElement.ParentRecord; string fieldName = e.TableCellIdentity.Column.MappingName; e.Style.CellType = "ComboBox"; break; } } Stefan >Hi, > >I need to set the cells of a row, for all columns, to be Combo-box. > >All the examples metion setting cells of a specific column to Combo-box > >Is there a way to achieve this? > >Regards, >Rishi >

Loader.
Up arrow icon