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.
Hello,
i''m using GridDataBound
i link a the grid with the dataTable as a datasource, then i create two GridBoundColumn which will be unbounds columns (one column contain buttons and the other comboBoxs)
when I add them the grid by using
GridBoundColumns.AddRange,the dataTable columns does not appear in the grid, when i comment the "GridBoundColumns.AddRange", i could display the the dataTable in the grid
Thanks in advance
ADAdministrator Syncfusion Team January 10, 2006 03:09 PM UTC
Hi,
You can add unbound columns with the help of GridBoundColumnCollection. You can add the unbound columns one by one to the gridBoundColumnCollection or collectively using gridBoundColumnCollection.AddRange. Here is code snippet.
GridBoundColumnsCollection column = (GridBoundColumnsCollection) this.gridDataBoundGrid.Binder.InternalColumns.Clone();
GridBoundColumn Ucolumn1 = new GridBoundColumn();
GridStyleInfo style1 = Ucolumn1.StyleInfo;
style1.CellType ="PushButton";
//column.Add(Ucolumn1); //Add one by one
GridBoundColumn Ucolumn2 = new GridBoundColumn();
GridStyleInfo style2 = Ucolumn1.StyleInfo;
style2.CellType ="ComboBox";
//column.Add(Ucolumn2); //Add one by one
column.AddRange(new GridBoundColumn[] {Ucolumn1,Ucolumn2});
//Add by AddRange
Regards,
Calvin.