Back to Devexpress

ColumnDataEventArgsBase.IsGetData Property

wpf-devexpress-dot-xpf-dot-grid-dot-columndataeventargsbase-5dfff6fd.md

latest5.4 KB
Original Source

ColumnDataEventArgsBase.IsGetData Property

Gets whether you should provide data for the currently processed cell.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public bool IsGetData { get; }
vb
Public ReadOnly Property IsGetData As Boolean

Property Value

TypeDescription
Boolean

true to provide data for the currently processed cell; otherwise, false.

|

Remarks

To learn more, see GridControl.CustomUnboundColumnData.

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsGetData property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-change-background-color-for-modified-cells/CS/HighlightChangedCellBehavior.cs#L53

csharp
var key = Tuple.Create(AssociatedObject.GetRowByListIndex(e.ListSourceRowIndex), e.Column.FieldName);
if (e.IsGetData) {
    bool res;

wpf-data-grid-create-custom-gridcontrol-that-displays-horizontal-columns/CS/dxExample/VGrid/VerticalGridControl.cs#L96

csharp
if (targetProperty == null) return;
if (e.IsGetData) {
    e.Value = targetProperty.GetValue(item);

wpf-data-grid-create-unbound-columns/CS/DXGrid_UnboundColumns_CodeBehind/Window1.xaml.cs#L12

csharp
void grid_CustomUnboundColumnData(object sender, GridColumnDataEventArgs e) {
    if(e.IsGetData) {
        int price = Convert.ToInt32(e.GetListSourceFieldValue(nameof(Product.UnitPrice)));

wpf-data-grid-display-icon-in-unbound-column-based-on-value-in-bound-column/CS/UnboundColumnWithIcons_CodeBehind/Window1.xaml.cs#L23

csharp
if(e.Column.FieldName == "IconUnbound") {
    if(e.IsGetData) {
        MyObject row = dataSource[e.ListSourceRowIndex];

wpf-data-grid-change-background-color-for-modified-cells/VB/HighlightChangedCellBehavior.vb#L75

vb
Dim key = System.Tuple.Create(Me.AssociatedObject.GetRowByListIndex(e.ListSourceRowIndex), e.Column.FieldName)
If e.IsGetData Then
    Dim res As Boolean

wpf-data-grid-create-custom-gridcontrol-that-displays-horizontal-columns/VB/dxExample/VGrid/VerticalGridControl.vb#L119

vb
End If
If e.IsGetData Then
    e.Value = targetProperty.GetValue(item)

wpf-data-grid-create-unbound-columns/VB/DXGrid_UnboundColumns_CodeBehind/Window1.xaml.vb#L16

vb
Private Sub grid_CustomUnboundColumnData(ByVal sender As Object, ByVal e As GridColumnDataEventArgs)
    If e.IsGetData Then
        Dim price As Integer = Convert.ToInt32(e.GetListSourceFieldValue(NameOf(Product.UnitPrice)))

wpf-data-grid-display-icon-in-unbound-column-based-on-value-in-bound-column/VB/UnboundColumnWithIcons_CodeBehind/Window1.xaml.vb#L26

vb
If Equals(e.Column.FieldName, "IconUnbound") Then
    If e.IsGetData Then
        Dim row As MyObject = dataSource(e.ListSourceRowIndex)

See Also

ColumnDataEventArgsBase Class

ColumnDataEventArgsBase Members

DevExpress.Xpf.Grid Namespace