Class TreeGridDateColumn
Represents a column that displays the date values in its cell content.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.TreeGrid
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class TreeGridDateColumn : TreeGridTextColumnBase, IDisposable, IFilterDefinition
Examples
<treeGrid:SfTreeGrid Name="sfTreeGrid"
ChildPropertyName="ReportsTo"
AutoGenerateColumns="False"
ItemsSource="{Binding Employees}"
ParentPropertyName="ID"
SelfRelationRootValue="-1" >
<treeGrid:SfTreeGrid.Columns>
<treeGrid:TreeGridDateColumn MappingName="OrderDate" HeaderText="Order Date"/>
</treeGrid:SfTreeGrid.Columns>
</treeGrid:SfTreeGrid>
Constructors
TreeGridDateColumn()
Initializes a new instance of TreeGridDateColumn class.
Declaration
public TreeGridDateColumn()
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.
DisplayDateFormatProperty
Identifies the DisplayDateFormat dependency property.
Declaration
public static readonly DependencyProperty DisplayDateFormatProperty
Field Value
Type |
---|
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 |
---|
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 |
---|
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 |
---|
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 |
---|
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 TreeGridDateColumn.
Declaration
public bool AllowNull { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the null values are allowed in TreeGridDateColumn; otherwise, false. The default value is true. |
Examples
treeGrid.Columns.Add(new TreeGridDateColumn() { MappingName = "Date" , AllowNull = true });
DisplayDateFormat
Gets or sets a string that specifies how to format the bounded value in TreeGridDateColumn.
Declaration
public string DisplayDateFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that specifies how to format the bound value in TreeGridDateColumn. The default value is d. |
Examples
<syncfuion:TreeGridDateColumn MappingName="Date" DisplayDateFormat ="D" />
EditMode
Gets or sets a value that specifies the edit mode to validate the input as per TreeGridDateColumn.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 TreeGridDateColumn.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:TreeGridDateColumn MappingName="Date" EditMode ="Mask" />
MaxDate
Gets or sets the maximum date and time that can be selected in TreeGridDateColumn.
Declaration
public DateTimeOffset MaxDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTimeOffset | The maximum date and time that can be selected in TreeGridDateColumn. The default value is 12/31/1920. |
Remarks
A SfCalendarDatePicker control is loaded in the record cells of the TreeGridDateColumn. It enables you to scroll through a list of dates between the MinDate and MaxDate and select one from it.
Examples
treeGrid.Columns.Add(new TreeGridDateColumn() { MappingName = "Date" , MinDate= new DateTimeOffset(new DateTime(2000, 01, 06)) });
See Also
MinDate
Gets or sets the minimum date that can be selected in TreeGridDateColumn.
Declaration
public DateTimeOffset MinDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTimeOffset | The minimum date that can be selected in TreeGridDateColumn. The default value is 1/1/1920. |
Remarks
A SfCalendarDatePicker control is loaded in the record cells of the TreeGridDateColumn. It enables you to scroll through a list of dates between the MinDate and MaxDate and select one from it.
Examples
treeGrid.Columns.Add(new TreeGridDateColumn() { MappingName = "Date" , MinDate= new DateTimeOffset(new DateTime(2000, 01, 06)) });
See Also
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:TreeGridDateColumn MappingName="Date" PlaceholderText ="Date" />
Methods
SetDisplayBindingConverter()
Sets the converter for the DisplayBinding of column.
Declaration
protected override void SetDisplayBindingConverter()
Overrides
Remarks
You can override this method to specify the converter for DisplayBinding .