Xceed Grid for WinForms v4.3 Documentation
Linked Property
Example 


Xceed.Grid.v4.3 Assembly > Xceed.Grid Namespace > DataBoundColumn Class : Linked Property
Gets a boolean value indicating if the column is linked to a field in the data source.
Syntax
'Declaration
 
<BrowsableAttribute(False)>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
Public ReadOnly Property Linked As Boolean
'Usage
 
Dim instance As DataBoundColumn
Dim value As Boolean
 
value = instance.Linked
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Linked {get;}

Property Value

true if the column is linked to a field in the data source; false otherwise.
Example
The following example demonstrates how to create and configure a column that will be linked to a data source when setting the DetailGrid.DataSource and DetailGrid.DataMember properties or when calling the DetailGrid.SetDataBinding method.
' 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

See Also

Reference

DataBoundColumn Class
DataBoundColumn Members