The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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
>