The following example demonstrates how to set the ShipName column as a grid's main column.
XAML |
Copy Code |
---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}" View="CardView"> <xcdg:DataGridControl.Columns> <xcdg:Column FieldName="ShipName" IsMainColumn="True"/> </xcdg:DataGridControl.Columns> </xcdg:DataGridControl> </Grid> |
VB.NET |
Copy Code |
---|---|
dataGridControl.Columns( "ShipName" ).IsMainColumn = True |
C# |
Copy Code |
---|---|
dataGridControl.Columns[ "ShipName" ].IsMainColumn = true; |