WinUI

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridDateColumn

    Show / Hide Table of Contents

    Class GridDateColumn

    Represents a column that displays the date values in its cell content.

    Inheritance
    System.Object
    ColumnBase<SfGridBase>
    GridColumnBase
    GridColumn
    GridTextColumnBase
    GridDateColumn
    Implements
    System.IDisposable
    INotifyDependencyPropertyChanged
    IFilterDefinition
    Inherited Members
    GridTextColumnBase.TextTrimmingProperty
    GridTextColumnBase.TextWrappingProperty
    GridTextColumnBase.TextTrimming
    GridTextColumnBase.TextWrapping
    GridColumn.FilterRowCellStyleProperty
    GridColumn.UseBindingValueProperty
    GridColumn.ColumnWidthModeProperty
    GridColumn.AllowDraggingProperty
    GridColumn.AllowGroupingProperty
    GridColumn.AllowResizingProperty
    GridColumn.AllowFilteringProperty
    GridColumn.ImmediateUpdateColumnFilterProperty
    GridColumn.FilterRowOptionsVisibilityProperty
    GridColumn.FilterRowConditionProperty
    GridColumn.FilterPopupStyleProperty
    GridColumn.FilterPopupTemplateProperty
    GridColumn.AllowBlankFiltersProperty
    GridColumn.FilterRowTextProperty
    GridColumn.IsCaseSensitiveFilterRowProperty
    GridColumn.GroupModeProperty
    GridColumn.SortModeProperty
    GridColumn.OnCellTemplateSelectorChanged(DependencyPropertyChangedEventArgs)
    GridColumn.OnCellTemplateChanged(DependencyPropertyChangedEventArgs)
    GridColumn.CanAllowSpinOnMouseScroll()
    GridColumn.Dispose(Boolean)
    GridColumn.GetRowFilterType()
    GridColumn.GetFilterRowOptionsVisibility()
    GridColumn.SetCellType(String)
    GridColumn.CanFocus()
    GridColumn.IsHiddenColumn()
    GridColumn.CanEditCell(Int32)
    GridColumn.CanEndEditColumn()
    GridColumn.UpdateBindingBasedOnAllowEditing()
    GridColumn.SetFilterRowText(String)
    GridColumn.OnDependencyPropertyChanged(String, DependencyPropertyChangedEventArgs)
    GridColumn.ColumnMemberType
    GridColumn.FilterRowCellStyle
    GridColumn.UseBindingValue
    GridColumn.ColumnWidthMode
    GridColumn.AllowDragging
    GridColumn.AllowGrouping
    GridColumn.AllowResizing
    GridColumn.AllowFiltering
    GridColumn.ImmediateUpdateColumnFilter
    GridColumn.FilterRowOptionsVisibility
    GridColumn.FilterRowCondition
    GridColumn.FilterPopupStyle
    GridColumn.FilterPopupTemplate
    GridColumn.AllowBlankFilters
    GridColumn.FilterRowText
    GridColumn.IsCaseSensitiveFilterRow
    GridColumn.GroupMode
    GridColumn.SortMode
    GridColumn.CellType
    GridColumn.FilteredFrom
    GridColumn.DataGrid
    GridColumn.FilterPredicates
    GridColumn.FilterBehavior
    GridColumn.ColumnFilter
    GridColumn.FilterRowEditorType
    GridColumnBase.ActualWidthProperty
    GridColumnBase.MappingNameProperty
    GridColumnBase.HeaderTextProperty
    GridColumnBase.AllowEditingProperty
    GridColumnBase.IsReadOnlyProperty
    GridColumnBase.DataValidationModeProperty
    GridColumnBase.UpdateTriggerProperty
    GridColumnBase.PaddingProperty
    GridColumnBase.AllowFocusProperty
    GridColumnBase.HeaderTemplateProperty
    GridColumnBase.CellTemplateProperty
    GridColumnBase.SetCellBoundValueProperty
    GridColumnBase.CellTemplateSelectorProperty
    GridColumnBase.CellStyleProperty
    GridColumnBase.CellStyleSelectorProperty
    GridColumnBase.HeaderStyleProperty
    GridColumnBase.AllowSortingProperty
    GridColumnBase.VerticalAlignmentProperty
    GridColumnBase.TextAlignmentProperty
    GridColumnBase.HorizontalHeaderContentAlignmentProperty
    GridColumnBase.WidthProperty
    GridColumnBase.IsHiddenProperty
    GridColumnBase.MaximumWidthProperty
    GridColumnBase.MinimumWidthProperty
    GridColumnBase.ShowHeaderToolTipProperty
    GridColumnBase.ToolTipTemplateProperty
    GridColumnBase.HeaderToolTipTemplateProperty
    GridColumnBase.ToolTipTemplateSelectorProperty
    GridColumnBase.ShowToolTipProperty
    GridColumnBase.SetCellBoundToolTipProperty
    GridColumnBase.OnUpdateBindingInfo(DependencyObject, DependencyPropertyChangedEventArgs)
    GridColumnBase.SetValueBindingConverter()
    GridColumnBase.CanEditCell()
    GridColumnBase.UpdateBindingForValidation(GridValidationMode)
    GridColumnBase.IsAutoGenerated
    GridColumnBase.IsTemplate
    GridColumnBase.ActualWidth
    GridColumnBase.MappingName
    GridColumnBase.HeaderText
    GridColumnBase.AllowEditing
    GridColumnBase.IsReadOnly
    GridColumnBase.DataValidationMode
    GridColumnBase.UpdateTrigger
    GridColumnBase.Padding
    GridColumnBase.AllowFocus
    GridColumnBase.HeaderTemplate
    GridColumnBase.CellTemplate
    GridColumnBase.SetCellBoundValue
    GridColumnBase.CellTemplateSelector
    GridColumnBase.CellStyle
    GridColumnBase.CellStyleSelector
    GridColumnBase.HeaderStyle
    GridColumnBase.AllowSorting
    GridColumnBase.VerticalAlignment
    GridColumnBase.TextAlignment
    GridColumnBase.HorizontalHeaderContentAlignment
    GridColumnBase.Width
    GridColumnBase.IsHidden
    GridColumnBase.MaximumWidth
    GridColumnBase.MinimumWidth
    GridColumnBase.ValueBinding
    GridColumnBase.DisplayBinding
    GridColumnBase.ShowHeaderToolTip
    GridColumnBase.ToolTipTemplate
    GridColumnBase.HeaderToolTipTemplate
    GridColumnBase.ToolTipTemplateSelector
    GridColumnBase.ShowToolTip
    GridColumnBase.SetCellBoundToolTip
    ColumnBase<SfGridBase>.Dispose()
    Namespace: Syncfusion.UI.Xaml.DataGrid
    Assembly: Syncfusion.Grid.WinUI.dll
    Syntax
    public class GridDateColumn : GridTextColumnBase, IDisposable, INotifyDependencyPropertyChanged, IFilterDefinition
    Examples
    <syncfusion:SfDataGrid x:Name="dataGrid" AutoGenerateColumns="False" ItemsSource="{Binding Orders}" >
      <syncfusion:SfDataGrid.Columns>
        <syncfusion:GridDateColumn
                                       HeaderText="Order Date"
                                       MappingName="OrderDate"                                   
      </syncfusion:SfDataGrid.Columns>
    </syncfusion:SfDataGrid>

    Constructors

    GridDateColumn()

    Initializes a new instance of GridDateColumn class.

    Declaration
    public GridDateColumn()

    Fields

    AllowNullProperty

    Identifies the AllowNull dependency property.

    Declaration
    public static readonly DependencyProperty AllowNullProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the AllowNull dependency property.

    DisplayDateFormatProperty

    Identifies the DisplayDateFormat dependency property.

    Declaration
    public static readonly DependencyProperty DisplayDateFormatProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the DisplayDateFormat dependency property.

    EditModeProperty

    Identifies DateTimeEditMode dependency property.

    Declaration
    public static readonly DependencyProperty EditModeProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the DateTimeEditMode dependency property.

    MaxDateProperty

    Identifies the MaxDate dependency property.

    Declaration
    public static readonly DependencyProperty MaxDateProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the MaxDate dependency property.

    MinDateProperty

    Identifies the MinDate dependency property.

    Declaration
    public static readonly DependencyProperty MinDateProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the MinDate dependency property.

    PlaceholderTextProperty

    Identifies the PlaceholderText dependency property.

    Declaration
    public static readonly DependencyProperty PlaceholderTextProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty
    Remarks

    The identifier for the PlaceholderText dependency property.

    Properties

    AllowNull

    Gets or sets a value that indicates whether the null values are allowed in GridDateColumn.

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

    true if the null values are allowed in GridDateColumn; otherwise, false. The default value is true.

    Examples
    sfDataGrid.Columns.Add(new GridDateColumn() { MappingName = "Date" , AllowNull = true });

    DisplayDateFormat

    Gets or sets a string that specifies how to format the bounded value in GridDateColumn.

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

    A string that specifies how to format the bound value in GridDateColumn. The default value is d.

    Examples
    <syncfuion:GridDateColumn MappingName="Date1" DisplayDateFormat ="D" />

    EditMode

    Gets or sets a value that specifies the edit mode to validate the input as per GridDateColumn.DisplayDateFormat format.

    Declaration
    public DateTimeEditMode EditMode { get; set; }
    Property Value
    Type Description
    DateTimeEditMode

    One of the DateTimeEditMode enumeration that specifies how the input numbers on the editor should be validated as per GridDateColumn.DisplayDateFormat property. The default value is Mask.

    Remarks

    Disable editing using DateTimeEditMode.None. Validate input as you type using DateTimeEditMode.Mask. Validate input when pressing enter key or when editor’s focus is lost using DateTimeEditMode.Normal.

    Examples
    <syncfuion:GridDateColumn MappingName="Date1" EditMode ="Mask" />

    MaxDate

    Gets or sets the maximum date and time that can be selected in GridDateColumn.

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

    The maximum date and time that can be selected in GridDateColumn. The default value is 12/31/1920.

    Remarks

    A SfCalendarDatePicker control is loaded in the record cells of the GridDateColumn. It enables you to scroll through a list of dates between the MinDate and MaxDate and select one from it.

    Examples
    sfDataGrid.Columns.Add(new GridDateColumn() { MappingName = "Date" , MaxDate= new DateTimeOffset(new DateTime(2021, 01, 06)) });
    See Also
    MinDate

    MinDate

    Gets or sets the minimum date and time that can be selected in GridDateColumn.

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

    The minimum date and time that can be selected in GridDateColumn. The default value is 1/1/1920.

    Remarks

    A SfCalendarDatePicker control is loaded in the record cells of the GridDateColumn. It enables you to scroll through a list of dates between the MinDate and MaxDate and select one from it.

    Examples
    sfDataGrid.Columns.Add(new GridDateColumn() { MappingName = "Date" , MinDate= new DateTimeOffset(new DateTime(2000, 01, 06)) });
    See Also
    MaxDate

    PlaceholderText

    Gets or sets the text that is displayed in the editor until the SelectedDate is changed by a user action or some other operation.

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

    The default value is "select a date".

    Examples
    <syncfuion:GridDateColumn MappingName="Date1" PlaceholderText ="Date" />

    Methods

    SetDisplayBindingConverter()

    Sets the converter for the DisplayBinding of column.

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

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

    Implements

    System.IDisposable
    INotifyDependencyPropertyChanged
    IFilterDefinition
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved