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. Image for the cookie policy date

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 04:00 PM

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.
Live Chat Icon For mobile
Up arrow icon