menu

WinUI

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

    Show / Hide Table of Contents

    Class GridTimeColumn

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

    Inheritance
    System.Object
    ColumnBase<SfGridBase>
    GridColumnBase
    GridColumn
    GridTextColumnBase
    GridTimeColumn
    Implements
    System.IDisposable
    INotifyDependencyPropertyChanged
    IFilterDefinition
    Inherited Members
    ColumnBase<SfGridBase>.Dispose()
    GridColumn.AllowBlankFilters
    GridColumn.AllowBlankFiltersProperty
    GridColumn.AllowDragging
    GridColumn.AllowDraggingProperty
    GridColumn.AllowFiltering
    GridColumn.AllowFilteringProperty
    GridColumn.AllowGrouping
    GridColumn.AllowGroupingProperty
    GridColumn.AllowResizing
    GridColumn.AllowResizingProperty
    GridColumn.CanAllowSpinOnMouseScroll()
    GridColumn.CanEditCell(Int32)
    GridColumn.CanEndEditColumn()
    GridColumn.CanFocus()
    GridColumn.CellType
    GridColumn.ColumnFilter
    GridColumn.ColumnMemberType
    GridColumn.ColumnWidthMode
    GridColumn.ColumnWidthModeProperty
    GridColumn.DataGrid
    GridColumn.Dispose(Boolean)
    GridColumn.FilterBehavior
    GridColumn.FilteredFrom
    GridColumn.FilterPopupStyle
    GridColumn.FilterPopupStyleProperty
    GridColumn.FilterPopupTemplate
    GridColumn.FilterPopupTemplateProperty
    GridColumn.FilterPredicates
    GridColumn.FilterRowCellStyle
    GridColumn.FilterRowCellStyleProperty
    GridColumn.FilterRowCondition
    GridColumn.FilterRowConditionProperty
    GridColumn.FilterRowEditorType
    GridColumn.FilterRowOptionsVisibility
    GridColumn.FilterRowOptionsVisibilityProperty
    GridColumn.FilterRowText
    GridColumn.FilterRowTextProperty
    GridColumn.GetFilterRowOptionsVisibility()
    GridColumn.GetRowFilterType()
    GridColumn.GroupMode
    GridColumn.GroupModeProperty
    GridColumn.ImmediateUpdateColumnFilter
    GridColumn.ImmediateUpdateColumnFilterProperty
    GridColumn.IsCaseSensitiveFilterRow
    GridColumn.IsCaseSensitiveFilterRowProperty
    GridColumn.IsHiddenColumn()
    GridColumn.OnCellTemplateChanged(DependencyPropertyChangedEventArgs)
    GridColumn.OnCellTemplateSelectorChanged(DependencyPropertyChangedEventArgs)
    GridColumn.OnDependencyPropertyChanged(String, DependencyPropertyChangedEventArgs)
    GridColumn.SetCellType(String)
    GridColumn.SetFilterRowText(String)
    GridColumn.SortMode
    GridColumn.SortModeProperty
    GridColumn.UpdateBindingBasedOnAllowEditing()
    GridColumn.UseBindingValue
    GridColumn.UseBindingValueProperty
    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.DataValidationMode
    GridColumnBase.DataValidationModeProperty
    GridColumnBase.DisplayBinding
    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
    GridTextColumnBase.TextTrimming
    GridTextColumnBase.TextTrimmingProperty
    GridTextColumnBase.TextWrapping
    GridTextColumnBase.TextWrappingProperty
    Namespace: Syncfusion.UI.Xaml.DataGrid
    Assembly: Syncfusion.Grid.WinUI.dll
    Syntax
    public class GridTimeColumn : GridTextColumnBase, IDisposable, INotifyDependencyPropertyChanged, IFilterDefinition
    Examples
    <syncfusion:SfDataGrid x:Name="dataGrid" AutoGenerateColumns="False" ItemsSource="{Binding Orders}" >
      <syncfusion:SfDataGrid.Columns>
        <syncfusion:GridTimeColumn
                                       HeaderText="Order Time"
                                       MappingName="OrderTime"                                   
      </syncfusion:SfDataGrid.Columns>
    </syncfusion:SfDataGrid>

    Constructors

    GridTimeColumn()

    Initializes a new instance of GridTimeColumn class.

    Declaration
    public GridTimeColumn()

    Fields

    AllowNullProperty

    Identifies the AllowNull dependency property.

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

    The identifier for the AllowNull dependency property.

    DisplayTimeFormatProperty

    Identifies the DisplayTimeFormat dependency property.

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

    The identifier for the DisplayTimeFormat dependency property.

    EditModeProperty

    Identifies DateTimeEditMode dependency property.

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

    The identifier for the DateTimeEditMode dependency property.

    MaxTimeProperty

    Identifies the MaxTime dependency property.

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

    The identifier for the MaxTime dependency property.

    MinTimeProperty

    Identifies the MinTime dependency property.

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

    The identifier for the MinTime dependency property.

    PlaceholderTextProperty

    Identifies the PlaceholderText dependency property.

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

    The identifier for the PlaceholderText dependency property.

    ShowSubmitButtonsProperty

    Identifies ShowSubmitButtons dependency property.

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

    The identifier for the ShowSubmitButtons dependency property.

    Properties

    AllowNull

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

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

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

    Examples
    sfDataGrid.Columns.Add(new GridTimeColumn() { MappingName = "OrderTime" , AllowNull = false });

    DisplayTimeFormat

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

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

    A string that specifies how to format the bound value in GridTimeColumn. The default value is hh:mm tt.

    Examples
    <syncfusion:GridTimeColumn MappingName="OrderTime" DisplayTimeFormat ="HH:mm:ss" />

    EditMode

    Gets or sets a value that specifies the edit mode to validate the input as per GridTimeColumn.DisplayTimeFormat 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 GridTimeColumn.DisplayTimeFormat 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:GridTimeColumn MappingName="OrderTime" EditMode ="Normal" />

    MaxTime

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

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

    The maximum date and time that can be selected in GridTimeColumn. The default value is 2121,12,31 DateTimeOffset.Now.Hour, DateTimeOffset.Now.Minute, DateTimeOffset.Now.Second, DateTimeOffset.Now.Offset.

    Remarks

    A SfTimePicker control is loaded in the record cells of the GridTimeColumn. It enables you to scroll through a list of times between the MinTime and MaxTime and select one from it.

    Examples
    sfDataGrid.Columns.Add(new GridTimeColumn() { MappingName = "OrderTime" , MaxDate= new DateTimeOffset(new DateTime(2021, 01, 06)) });
    See Also
    MaxTime

    MinTime

    Gets or sets the minimum time that can be selected in GridTimeColumn.

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

    The minimum time that can be selected in GridTimeColumn. The default value is 1921, 1, 1, DateTimeOffset.Now.Hour, DateTimeOffset.Now.Minute, DateTimeOffset.Now.Second, DateTimeOffset.Now.Offset.

    Remarks

    A SfTimePicker control is loaded in the record cells of the GridTimeColumn. It enables you to scroll through a list of times between the MinTime and MaxTime and select one from it.

    Examples
    sfDataGrid.Columns.Add(new GridTimeColumn() { MappingName = "OrderTime" , MinTime= new DateTimeOffset(new DateTime(2000, 01, 06,02,45,23)) });
    See Also
    MaxTime

    PlaceholderText

    Gets or sets the text that is displayed in the editor until the SelectedTime 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 time".

    Examples
    <syncfuion:GridTimeColumn MappingName="OrderTime" PlaceholderText ="Select a time" />

    ShowSubmitButtons

    Gets or sets a value indicating whether to show or hide the accept and decline buttons in editor.

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

    true if the submit buttons are visible ; otherwise , false. The default value is true.

    Examples
    <syncfuion:GridTimeColumn MappingName="OrderTime" ShowSubmitButtons ="False" />

    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 - 2025 Syncfusion Inc. All Rights Reserved