| Visual Basic (Declaration) | |
|---|---|
Public ReadOnly Property Columns As ColumnCollection | |
| C# | |
|---|---|
public ColumnCollection Columns {get;} | |
Return Value
A reference to a ColumnCollection containing a list of the grid's columns. By default, a null reference (Nothing in Visual Basic).All examples in this topic assume that the grid is bound to the Orders or Employees table of the Northwind database, unless stated otherwise.
The following example demonstrates how to fix the ShipCountry and ShipCity columns.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
The following example demonstrates how to set routed view properties on detail configurations to change the width of their detail indicators as well as to fix columns and remove the fixed-column splitter.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" | |
All columns, regardless of their state, will be contained in the collection. To retrieve the columns that are only visible in the grid's viewport, consult the VisibleColumns property.
Supported Frameworks: Microsoft .NET Framework version 3.5
Reference
DataGridControl ClassDataGridControl Members
Properties
VisibleColumns PropertyAutoCreateColumns Property
Copy Code