menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridColumn - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridColumn

    Provides the base functionalities for all the column types in SfDataGrid.

    Inheritance
    System.Object
    SfGridColumnBase<SfGridBase>
    GridColumnBase
    GridColumn
    GridCheckBoxColumn
    GridComboBoxColumn
    GridImageColumn
    GridTextColumnBase
    GridToggleSwitchColumn
    GridUpDownColumn
    Implements
    System.IDisposable
    INotifyDependencyPropertyChanged
    IFilterDefinition
    Inherited Members
    GridColumnBase.ActualWidth
    GridColumnBase.ActualWidthProperty
    GridColumnBase.AllowEditing
    GridColumnBase.AllowEditingProperty
    GridColumnBase.AllowFocus
    GridColumnBase.AllowFocusProperty
    GridColumnBase.AllowSorting
    GridColumnBase.AllowSortingProperty
    GridColumnBase.CanEditCell()
    GridColumnBase.CellStyle
    GridColumnBase.CellStyleProperty
    GridColumnBase.CellStyleSelector
    GridColumnBase.CellStyleSelectorProperty
    GridColumnBase.CellTemplate
    GridColumnBase.CellTemplateProperty
    GridColumnBase.CellTemplateSelector
    GridColumnBase.CellTemplateSelectorProperty
    GridColumnBase.DisplayBinding
    GridColumnBase.GridValidationMode
    GridColumnBase.GridValidationModeProperty
    GridColumnBase.HeaderStyle
    GridColumnBase.HeaderStyleProperty
    GridColumnBase.HeaderTemplate
    GridColumnBase.HeaderTemplateProperty
    GridColumnBase.HeaderText
    GridColumnBase.HeaderTextProperty
    GridColumnBase.HeaderToolTipTemplate
    GridColumnBase.HeaderToolTipTemplateProperty
    GridColumnBase.HorizontalHeaderContentAlignment
    GridColumnBase.HorizontalHeaderContentAlignmentProperty
    GridColumnBase.IsAutoGenerated
    GridColumnBase.IsHidden
    GridColumnBase.IsHiddenProperty
    GridColumnBase.IsReadOnly
    GridColumnBase.IsReadOnlyProperty
    GridColumnBase.IsTemplate
    GridColumnBase.MappingName
    GridColumnBase.MappingNameProperty
    GridColumnBase.MaximumWidth
    GridColumnBase.MaximumWidthProperty
    GridColumnBase.MinimumWidth
    GridColumnBase.MinimumWidthProperty
    GridColumnBase.OnUpdateBindingInfo(DependencyObject, DependencyPropertyChangedEventArgs)
    GridColumnBase.Padding
    GridColumnBase.PaddingProperty
    GridColumnBase.SetCellBoundToolTip
    GridColumnBase.SetCellBoundToolTipProperty
    GridColumnBase.SetCellBoundValue
    GridColumnBase.SetCellBoundValueProperty
    GridColumnBase.SetValueBindingConverter()
    GridColumnBase.ShowHeaderToolTip
    GridColumnBase.ShowHeaderToolTipProperty
    GridColumnBase.ShowToolTip
    GridColumnBase.ShowToolTipProperty
    GridColumnBase.TextAlignment
    GridColumnBase.TextAlignmentProperty
    GridColumnBase.ToolTipTemplate
    GridColumnBase.ToolTipTemplateProperty
    GridColumnBase.ToolTipTemplateSelector
    GridColumnBase.ToolTipTemplateSelectorProperty
    GridColumnBase.UpdateBindingForValidation(GridValidationMode)
    GridColumnBase.UpdateTrigger
    GridColumnBase.UpdateTriggerProperty
    GridColumnBase.ValueBinding
    GridColumnBase.VerticalAlignment
    GridColumnBase.VerticalAlignmentProperty
    GridColumnBase.Width
    GridColumnBase.WidthProperty
    SfGridColumnBase<SfGridBase>.Dispose()
    Namespace: Syncfusion.UI.Xaml.Grid
    Assembly: Syncfusion.SfGrid.UWP.dll
    Syntax
    public abstract class GridColumn : GridColumnBase, IDisposable, INotifyDependencyPropertyChanged, IFilterDefinition

    Constructors

    GridColumn()

    Declaration
    protected GridColumn()

    Fields

    AllowBlankFiltersProperty

    Identifies the AllowBlankFilters dependency property.

    Declaration
    public static readonly DependencyProperty AllowBlankFiltersProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowBlankFilters dependency property.

    AllowDraggingProperty

    Identifies the AllowDragging dependency property.

    Declaration
    public static readonly DependencyProperty AllowDraggingProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowDragging dependency property.

    AllowFilteringProperty

    Identifies the AllowFiltering dependency property.

    Declaration
    public static readonly DependencyProperty AllowFilteringProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowFiltering dependency property.

    AllowGroupingProperty

    Identifies the AllowGrouping dependency property.

    Declaration
    public static readonly DependencyProperty AllowGroupingProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowGrouping dependency property.

    AllowResizingProperty

    Identifies the AllowResizing dependency property.

    Declaration
    public static readonly DependencyProperty AllowResizingProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowResizing dependency property.

    ColumnSizerProperty

    Identifies the ColumnSizer dependency property.

    Declaration
    public static readonly DependencyProperty ColumnSizerProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ColumnSizer dependency property.

    FilterPopupStyleProperty

    Identifies the FilterPopupStyle dependency property.

    Declaration
    public static readonly DependencyProperty FilterPopupStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterPopupStyle dependency property.

    FilterPopupTemplateProperty

    Identifies the FilterPopupTemplate dependency property.

    Declaration
    public static readonly DependencyProperty FilterPopupTemplateProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterPopupTemplate dependency property.

    FilterRowCellStyleProperty

    Identifies the FilterRowCellStyle dependency property.

    Declaration
    public static readonly DependencyProperty FilterRowCellStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterRowCellStyle dependency property.

    FilterRowConditionProperty

    Identifies the FilterRowCondition dependency property.

    Declaration
    public static readonly DependencyProperty FilterRowConditionProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterRowCondition dependency property.

    FilterRowOptionsVisibilityProperty

    Identifies the FilterRowOptionsVisibility dependency property.

    Declaration
    public static readonly DependencyProperty FilterRowOptionsVisibilityProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterRowOptionsVisibility dependency property.

    FilterRowTextProperty

    Identifies the FilterRowText dependency property.

    Declaration
    public static readonly DependencyProperty FilterRowTextProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the FilterRowText dependency property.

    GroupModeProperty

    Identifies the GroupMode dependency property.

    Declaration
    public static readonly DependencyProperty GroupModeProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the GroupMode dependency property.

    ImmediateUpdateColumnFilterProperty

    Identifies the ImmediateUpdateColumnFilter dependency property.

    Declaration
    public static readonly DependencyProperty ImmediateUpdateColumnFilterProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the ImmediateUpdateColumnFilter dependency property.

    IsCaseSensitiveFilterRowProperty

    Identifies the IsCaseSensitiveFilterRow dependency property.

    Declaration
    public static readonly DependencyProperty IsCaseSensitiveFilterRowProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the IsCaseSensitiveFilterRow dependency property.

    SortModeProperty

    Identifies the SortMode dependency property.

    Declaration
    public static readonly DependencyProperty SortModeProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the SortMode dependency property.

    UseBindingValueProperty

    Identifies the dependency property.

    Declaration
    public static readonly DependencyProperty UseBindingValueProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the dependency property.

    Properties

    AllowBlankFilters

    Get or sets a value that indicates whether the blank values are allowed for filtering in column.

    Declaration
    public bool AllowBlankFilters { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the blank values are allowed for filtering in column; otherwise, false. The default value is true.

    See Also
    AllowFiltering

    AllowDragging

    Gets or sets a value that indicates whether the user can rearrange the columns.

    Declaration
    public bool AllowDragging { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the user can re arrange the columns; otherwise, false. The default value is false .

    See Also
    AllowDraggingColumns

    AllowFiltering

    Gets or sets a value that indicates whether to enable UI Filtering in column header to filter the column.

    Declaration
    public bool AllowFiltering { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the UI filtering is enabled in the column ; otherwise, false.The default value is false.

    Remarks

    The filtering operation can be canceled or customized through FilterChanging and FilterChanged events in SfDataGrid.

    See Also
    ColumnFilter
    FilterBehavior
    FilteredFrom
    FilterPredicates
    FilterItemsPopulating
    FilterItemsPopulated
    FilterPopupTemplate
    FilterPopupStyle
    CanUseViewFilter
    FilterRowPosition
    AllowFiltering

    AllowGrouping

    Gets or sets a value indicates whether the user can drag and drop the column to GroupDropArea.

    Declaration
    public bool AllowGrouping { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the user can drag and drop the column to GroupDropArea; otherwise, false. The default value is true .

    Remarks

    This property will takes higher priority than AllowGrouping property.

    See Also
    AllowGrouping

    AllowResizing

    Gets or sets a value that indicates whether the user can resize the column.

    Declaration
    public bool AllowResizing { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the user can adjust the column width; otherwise, false. The default value is false .

    CellType

    Gets the cell type of the column which denotes renderer associated with column.

    Declaration
    public string CellType { get; }
    Property Value
    Type Description
    System.String

    A string that represents the cell type of the column.

    ColumnFilter

    Gets or sets a value that decides whether to filter based on display value or based on MappingName.

    Declaration
    public ColumnFilter ColumnFilter { get; set; }
    Property Value
    Type Description
    ColumnFilter

    One of the ColumnFilter enumeration that decides how the items populated for the filter control in the column. By default, the filter value is populated based on property.

    See Also
    AllowFiltering

    ColumnMemberType

    Gets or sets the member type to load the appropriate AdvancedFilterType to AdvancedFilterControl .

    Declaration
    public Type ColumnMemberType { get; set; }
    Property Value
    Type Description
    System.Type

    The type that loads the appropriate AdvancedFilterType to AdvancedFilterControl in column.

    Remarks

    By default, the AdvancedFilterControl loads TextFilter , when the underlying data source is dynamic. So , you can decide the appropriate AdvancedFilterType by using this property based on its member type. For example, the TextFilter for string type , NumberFilter for numeric type and the DateFilter for DateTime type of member.

    See Also
    AllowFiltering

    ColumnSizer

    Gets or sets the value that indicates how the column width is determined.

    Declaration
    public GridLengthUnitType ColumnSizer { get; set; }
    Property Value
    Type Description
    GridLengthUnitType

    One of the GridLengthUnitType enumeration that adjust the column width. The default value is None.

    DataGrid

    Gets the reference to the SfDataGrid control.

    Declaration
    protected SfDataGrid DataGrid { get; }
    Property Value
    Type
    SfDataGrid

    FilterBehavior

    Gets or sets a value that decides whether filter value should be considered as string type or its underlying type while filtering.

    Declaration
    public FilterBehavior FilterBehavior { get; set; }
    Property Value
    Type Description
    FilterBehavior

    One of the enumeration that specifies the filter behavior of the column.

    Remarks

    The Advanced Filter UI will be loaded based on this property.

    See Also
    ColumnFilter
    FilteredFrom
    FilterPredicates
    AllowFiltering

    FilteredFrom

    Gets a value that determines whether the column is filtered from Check box filter UI or Advanced filter in UI Filtering.

    Declaration
    public FilteredFrom FilteredFrom { get; set; }
    Property Value
    Type Description
    FilteredFrom

    One of FilteredFrom enumeration that specifies when the column is from .

    See Also
    ColumnFilter
    FilterBehavior
    FilterPredicates
    AllowFiltering

    FilterPopupStyle

    Gets or sets the style applied to the filter popup in column.

    Declaration
    public Style FilterPopupStyle { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Style

    The style that is applied to the filter pop-up in GridColumn. The default value is null.

    Remarks

    To define a for filter pop-up, specify a TargetType of GridFilterControl.

    See Also
    FilterPopupStyle
    AllowFiltering

    FilterPopupTemplate

    Gets or sets that defines the visual representation of the filter pop-up in GridColumn.

    Declaration
    public DataTemplate FilterPopupTemplate { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.DataTemplate

    The object that defines the visual representation of the filter pop-up in GridColumn. The default value is null.

    See Also
    FilterPopupTemplate

    FilterPredicates

    Gets the collection of FilterPredicate in the column.

    Declaration
    public ObservableCollection<FilterPredicate> FilterPredicates { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<FilterPredicate>

    The collection of filter predicate in the column.

    FilterRowCellStyle

    Gets or sets the style applied to the FilterRow cell of the column.

    Declaration
    public Style FilterRowCellStyle { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Style

    The style that is applied to the FilterRow cell of the column. The default value is null.

    Remarks

    To define a for a FilterRow cell, specify a TargetType of GridFilterRowCell.

    See Also
    FilterRowPosition
    FilterRowCondition
    FilterRowCondition

    FilterRowCondition

    Gets or sets a value that decides the default FilterRowCondition that have to be filter while typing in corresponding FilterRow cell.

    Declaration
    public FilterRowCondition FilterRowCondition { get; set; }
    Property Value
    Type Description
    FilterRowCondition

    One of the enumeration that specifies the FilterRow constraints of the column.

    Remarks

    The FilterRowCell which loads the TextBox, Numeric or DateTime editor allows you to edit the values to filter in the corresponding column. Where you can change the default conditions that want to be applied for the particular filtering as per the editor that have been loaded.

    EditorDefault FilterRowCondition
    TextBoxBeginsWith
    NumericEquals

    FilterRowEditorType

    Gets or sets a value which denotes the Editor which have to be load in corresponding FilterRowCell.

    Declaration
    public string FilterRowEditorType { get; set; }
    Property Value
    Type
    System.String
    Remarks

    The name which refers the renderers in FilterRowCellRenderers collection. By default, the corresponding renderer will be loaded based on underlying type.

    NameRenderers
    TextBoxGridFilterRowTextBoxRenderer
    NumericGridFilterRowNumericRenderer
    CheckBoxGridFilterRowCheckBoxRenderer
    See Also
    FilterRowPosition
    FilterRowCondition
    FilterRowCondition

    FilterRowOptionsVisibility

    Gets or sets a value that indicates whether the FilterRowOptions button is visible in the GridFilterRowCell.

    Declaration
    public Visibility FilterRowOptionsVisibility { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Visibility

    One of the enumeration that specifies the FilterRowOptions button visiblity in GridFilterRowCell; The default value is Visibility.Visible .

    See Also
    FilterRowPosition
    FilterRowCondition
    FilterRowCondition

    FilterRowText

    Gets the filtered value of the particular column where the filtering has been applied through FilterRow.

    Declaration
    public object FilterRowText { get; protected set; }
    Property Value
    Type Description
    System.Object

    The filtered value that is applied FilterRow in the particular column. The default value is null.

    See Also
    FilterRowPosition

    GroupMode

    Gets or sets a value that decides whether grouping is processed based on display value or edit value of column.

    Declaration
    public DataReflectionMode GroupMode { get; set; }
    Property Value
    Type Description
    DataReflectionMode

    Default mode performs default grouping operation based on value. Display mode performs grouping operation based on display value of column. Value mode performs grouping operation based on actual value of column.

    Remarks

    Group key is set based on property.

    ImmediateUpdateColumnFilter

    Gets or sets a value that indicates whether the data is automatically filtered as soon as an user selects or types value in the filter pop-up of column.

    Declaration
    public bool ImmediateUpdateColumnFilter { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the data is filtered automatically; otherwise false. The default value is false.

    See Also
    AllowFiltering

    IsCaseSensitiveFilterRow

    Gets or sets value that indicates whether the case sensitive filtering is enabled on FilterRowCell of a particular column.

    Declaration
    public bool IsCaseSensitiveFilterRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the case sensitive filtering is enabled on the FilterRowCell of a column; otherwise, false. The default value is false.

    SortMode

    Gets or sets a value that decides whether sorting is processed based on display value or edit value of column.

    Declaration
    public DataReflectionMode SortMode { get; set; }
    Property Value
    Type Description
    DataReflectionMode

    Default mode performs default sorting operation based on value. Display mode performs sorting operation based on display value of column. Value mode performs sorting operation based on actual value of column.

    UseBindingValue

    Gets or sets a value that indicates whether the binding gets property value from column wrapper instead of reflecting value from the item properties.

    Declaration
    public bool UseBindingValue { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the property value gets from column wrapper; otherwise, false. The default value is false.

    Remarks

    This property helps to perform sorting, filtering, grouping operations on complex or indexer properties.

    Methods

    CanAllowSpinOnMouseScroll()

    Determines whether to increment and decrement the cell value in mouse wheel and up,down arrow key is pressed.

    Declaration
    protected virtual bool CanAllowSpinOnMouseScroll()
    Returns
    Type Description
    System.Boolean

    Returns true if the cell value can be rotated using mouse wheel or up and down arrow key ; otherwise false .

    CanEditCell(Int32)

    Determines whether the column is editable.

    Declaration
    protected virtual bool CanEditCell(int rowIndex = -1)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The corresponding rowIndex of the editable cell.

    Returns
    Type Description
    System.Boolean

    Returns true if all the cells with in the column is editable .

    CanEndEditColumn()

    Determines whether the boolean type columns can EndEdit or not.

    Declaration
    protected virtual bool CanEndEditColumn()
    Returns
    Type Description
    System.Boolean

    Returns true, if the column is boolean type, otherwise false.

    Remarks

    Override this method to determine whether the EndEdit should be processed for boolean type columns or not. For all other column types EndEdit will be processed based on the IsEditable property.

    CanFocus()

    Determines whether the corresponding column can receive focus.

    Declaration
    protected virtual bool CanFocus()
    Returns
    Type Description
    System.Boolean

    Returns true if the column is loaded with editor in its CellTemplate.

    Dispose(Boolean)

    Releases all resources used by the SfDataGrid and Columns.

    Declaration
    protected override void Dispose(bool isDisposing)
    Parameters
    Type Name Description
    System.Boolean isDisposing

    Indicates whether the call is from Dispose method or from a finalizer.

    Overrides
    GridColumnBase.Dispose(Boolean)

    GetFilterRowOptionsVisibility()

    Gets the value that indicates the visibility of FilterOption button.

    Declaration
    protected virtual Visibility GetFilterRowOptionsVisibility()
    Returns
    Type Description
    Windows.UI.Xaml.Visibility

    Returns Visible if FilterOptions is required for the particular FilterRowCell.

    GetRowFilterType()

    Gets the AdvancedFilterType of the parituclar column

    Declaration
    protected virtual string GetRowFilterType()
    Returns
    Type Description
    System.String

    Returns the editor type which need to be load in GridFilterRowCell.

    IsHiddenColumn()

    Determines whether the corresponding column is hidden or not.

    Declaration
    protected virtual bool IsHiddenColumn()
    Returns
    Type Description
    System.Boolean

    Returns true if the column is hidden or width is zero otherwise false.

    OnCellTemplateChanged(DependencyPropertyChangedEventArgs)

    Invoked when the dependency property value changed in the column.

    Declaration
    protected override void OnCellTemplateChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs e

    The that contains data for CellTemplate dependency property changes.

    Overrides
    GridColumnBase.OnCellTemplateChanged(DependencyPropertyChangedEventArgs)

    OnCellTemplateSelectorChanged(DependencyPropertyChangedEventArgs)

    Invoked when the CellTemplateSelector dependency property is changed in column.

    Declaration
    protected override void OnCellTemplateSelectorChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs e

    The that contains data for the CellTemplateSelector dependency property changes.

    Overrides
    GridColumnBase.OnCellTemplateSelectorChanged(DependencyPropertyChangedEventArgs)

    OnDependencyPropertyChanged(String, DependencyPropertyChangedEventArgs)

    Invoked whenever the value of any dependency property in the column has been updated.

    Declaration
    public void OnDependencyPropertyChanged(string propertyName, DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.String propertyName

    The property name that has changed in column.

    Windows.UI.Xaml.DependencyPropertyChangedEventArgs e

    that contains the data for various dependency property changed events.

    SetCellType(String)

    Sets the cell type which indicates the renderer for the column.

    Declaration
    protected void SetCellType(string cellType)
    Parameters
    Type Name Description
    System.String cellType

    Specifies the corresponding cell type of the column.

    SetDisplayBindingConverter()

    Sets the converter for the DisplayBinding of column.

    Declaration
    protected override void SetDisplayBindingConverter()
    Overrides
    GridColumnBase.SetDisplayBindingConverter()
    Remarks

    You can override this method to specify the converter for DisplayBinding.

    SetFilterRowText(String)

    Set the FilterRowText while applying the Filtered from FilterRow

    Declaration
    protected virtual void SetFilterRowText(string filterRowText)
    Parameters
    Type Name Description
    System.String filterRowText

    FilterText of that column

    UpdateBindingBasedOnAllowEditing()

    Updates the binding based on the allowediting.

    Declaration
    protected override void UpdateBindingBasedOnAllowEditing()
    Overrides
    GridColumnBase.UpdateBindingBasedOnAllowEditing()

    Implements

    System.IDisposable
    INotifyDependencyPropertyChanged
    IFilterDefinition

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved