Class GridDateTimeColumn
Represents a SfDataGrid column that hosts Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker in its cells.
Implements
Inherited Members
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class GridDateTimeColumn : GridColumn, IDisposable
Remarks
Use GridDateTimeColumn to display columns of date-time as picker data in Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker.
To create a column, add it to the Columns collection. To populate the column, bind the column to the data by using the DisplayBinding property. The Binding property is applied to the Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker view created in the column. The Xamarin.Forms.BindableObject.BindingContext for the view in each cell is the data item for the row the cell is in. Therefore, to set up the binding you only have to set the Xamarin.Forms.Binding.Path. Optionally, you can specify a Xamarin.Forms.Binding.Converter if your data source and target are different types.
Examples
<sfGrid:SfDataGrid.Columns>
<sfgrid:GridDateTimeColumn Format="d"
HeaderText="Shipped Date"
MappingName="ShippedDate" />
</sfGrid:SfDataGrid.Columns>
Constructors
GridDateTimeColumn()
Initializes a new instance of the GridDateTimeColumn class.
Declaration
public GridDateTimeColumn()
Fields
MaximumDateProperty
Identifies the MaximumDate Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty MaximumDateProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
MinimumDateProperty
Identifies the MinimumDate Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty MinimumDateProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
Properties
MaximumDate
Gets or sets the maximum date to be available in the Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker in each record cell of the GridDateTimeColumn.
Declaration
public DateTime MaximumDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The maximum date to be available in the Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker. |
Remarks
The Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker enables you to scroll through a list of dates between the MinimumDate and MaximumDate and select one from it. A Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker control is loaded in the record cells of the GridDateTimeColumn. It enables you to scroll through a list of dates between the MinimumDate and MaximumDate and select one from it.
Examples
GridDateTimeColumn dateTimeColumn = new GridDateTimeColumn();
dateTimeColumn.MaximumDate = new DateTime(2020, 01, 01);
dateTimeColumn.MinimumDate = new DateTime(1990, 01, 01);
dataGrid.Columns.Add(dateTimeColumn);
See Also
MinimumDate
Gets or sets the minimum date to be available in the Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker in each record cell of the GridDateTimeColumn.
Declaration
public DateTime MinimumDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The minimum date to be available in the Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker. |
Remarks
A Syncfusion.SfDataGrid.XForms.Renderers.SfDatePicker control is loaded in the record cells of the GridDateTimeColumn. It enables you to scroll through a list of dates between the MinimumDate and MaximumDate and select one from it.
Examples
GridDateTimeColumn dateTimeColumn = new GridDateTimeColumn();
dateTimeColumn.MaximumDate = new DateTime(2020, 01, 01);
dateTimeColumn.MinimumDate = new DateTime(1990, 01, 01);
dataGrid.Columns.Add(dateTimeColumn);