AD
Administrator
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.