How to add and format unbound columns in GridGrouping control

9 Dec 20191 minute to read

The unbound columns can be added and formatted using the below code.

  • C#
  • //Adds unbound column in GridGroupingControl.
    this.gridGroupingControl1.TableDescriptor.UnboundFields.Add("UnboundColumn1");
    
    //Formats the Unbound column.
    this.gridGroupingControl1.TableDescriptor.Columns["UnboundColumn1"].Appearance.AnyRecordFieldCell.CellType = "CheckBox";
    this.gridGroupingControl1.TableDescriptor.Columns["UnboundColumn1"].Appearance.AnyRecordFieldCell.BackColor = Color.LightSteelBlue;
  • VB
  • 'Adds an Unbound column in a  GridGroupingControl.
    Me.gridGroupingControl1.TableDescriptor.UnboundFields.Add("UnboundColumn1")
    
    'Formats an Unbound column in GridGroupingControl.
    Me.gridGroupingControl1.TableDescriptor.Columns("UnboundColumn1").Appearance.AnyRecordFieldCell.CellType = "CheckBox"
    
    Me.gridGroupingControl1.TableDescriptor.Columns("UnboundColumn1").Appearance.AnyRecordFieldCell.BackColor = Color.LightSteelBlue