' Create a new column specifying the name of the field ' in the data source to which the column is to be linked. Dim column As New DataBoundColumn( "ShipCountry" ) ' Configure various properties of the column column.Alignment = ContentAligment.MiddleCenter column.BackColor = Color.Pink ' Add the column to the grid's list of columns. ' At this point, the value of the column's Linked property ' is false. gridControl1.Columns.Add( column ) ' Set the data binding. gridControl1.SetDataBinding( dataSource, null ) ' Once the data binding has been completed successfully ' and the name of the column we just added to the grid ' matches the name of one of the fields in the data source, ' the value of the column's Linked property changes to true ' and the its datatype matches the datatype of the column in the ' data source to which it is linked.
// Create a new column specifying the name of the field // in the data source to which the column is to be linked. Column column = new DataBoundColumn( "ShipCountry" ); // Configure various properties of the column column.HorizontalAlignment = Xceed.Grid.HorizontalAlignment.Center; column.BackColor = Color.Pink; // Add the column to the grid's list of columns. // At this point, the value of the column's Linked property // is false. gridControl1.Columns.Add( column ); // Set the data binding. gridControl1.SetDataBinding( dataSource, null ); // Once the data binding has been completed successfully // and the name of the column we just added to the grid // matches the name of one of the fields in the data source, // the value of the column's Linked property changes to true // and the its datatype matches the datatype of the column in the // data source to which it is linked.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2