You are viewing help content for pre-release software. This document and the features it describes are subject to change. Switch to the current version.

GridColumnDataEventArgs Class

Provides data for the GridControl.CustomUnboundColumnData event.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.dll

Declaration

public class GridColumnDataEventArgs :
    ColumnDataEventArgsBase
Public Class GridColumnDataEventArgs
    Inherits ColumnDataEventArgsBase

Remarks

To learn more, see Unbound Columns.

Examples

This example demonstrates how to emulate row selection via an unbound column with a checkbox. The grid's built-in editing is used. It's enabled when the view's NavigationStyle property is set to CellNavigation. Starting from the 12.1.8 version, we support a new way of implementing multiple row selection via a checked column. Please refer to the following article, which shows how to implement this: How to implement multiple row selection behavior via a checked column.

View Example

<Window x:Class="UnboundCheckColumn.Window1" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        Title="Window1" Height="600" Width="400">
    <StackPanel>
        <Button Click="BtnInvert_Click">Invert selection</Button>
        <Button Click="BtnGetSelected_Click">Get selection</Button>
        <dxg:GridControl x:Name="grid" CustomUnboundColumnData="grid_CustomUnboundColumnData" Height="500" ItemsSource="{Binding List}">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="Id" />
                <dxg:GridColumn FieldName="Number" />
                <dxg:GridColumn FieldName="Selected" UnboundType="Boolean" AllowSorting="False">
                    <dxg:GridColumn.CellTemplate>
                        <DataTemplate>
                            <dxe:CheckEdit IsChecked="{Binding Data.Selected}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </DataTemplate>
                    </dxg:GridColumn.CellTemplate>
                </dxg:GridColumn>
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TableView x:Name="view" AutoWidth="True" />
            </dxg:GridControl.View>
        </dxg:GridControl>
    </StackPanel>
</Window>

Inheritance

See Also