Tab
A newer version of this page is available. Switch to the current version.

DateEditRangeSettings.StartDateEditID Property

Gets or sets the ID of an ASPxDateEdit control that will be used to specify the start date of a range.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue("")]
public string StartDateEditID { get; set; }
<DefaultValue("")>
Public Property StartDateEditID As String

Property Value

Type Default Description
String

String.Empty

A string value specifying the ID of an ASPxDateEdit control.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to StartDateEditID
ASP.NET Controls and MVC Extensions ASPxDateEdit
.DateRangeSettings.StartDateEditID
DateEditProperties
.DateRangeSettings.StartDateEditID
MVCxColumnDateEditProperties
.DateRangeSettings.StartDateEditID
MVCxDateEdit
.DateRangeSettings.StartDateEditID
MVCxDateEditProperties
.DateRangeSettings.StartDateEditID
MVCxDateEditProperties
.DateRangeSettings.StartDateEditID
RibbonDateEditProperties
.DateRangeSettings.StartDateEditID
ASP.NET Bootstrap Controls BootstrapDateEdit
.DateRangeSettings.StartDateEditID
BootstrapDateEditProperties
.DateRangeSettings.StartDateEditID

Remarks

The ASPxDateEdit control provides the capability to select a date range. To implement this functionality, two ASPxDateEdit controls should be used: for specifying the start and the end date of the range. To link two editors, set the StartDateEditID property of the second editor (end-date editor) to a value specifying the ID of the first editor (start-date editor).


<dx:ASPxDateEdit ID="deStart" ClientInstanceName="deStart" runat="server" Caption="Start Date">
</dx:ASPxDateEdit>

<dx:ASPxDateEdit ID="deEnd" ClientInstanceName="deEnd" runat="server" Caption="End Date">
     <DateRangeSettings StartDateEditID="deStart"></DateRangeSettings>
</dx:ASPxDateEdit>

ASPxDateEdit_Range

NOTE

The editor's date range settings should be specified for the end-date ASPxDateEdit control. The properties specified for the start-date editor are not in effect.

When the Date Range Picker is used in DevExpress ASP.NET and MVC GridView using built-in editors, the StartDateEditID property can be specified using the FieldName property of the Start Edit column.

WebForms approach:


<dx:GridViewDataDateColumn FieldName="StartDate">
</dx:GridViewDataDateColumn>
<dx:GridViewDataDateColumn FieldName="EndDate">
    <PropertiesDateEdit>
        <DateRangeSettings StartDateEditID="StartDate"/>
    </PropertiesDateEdit>
</dx:GridViewDataDateColumn>

MVC approach:


...
settings.Columns.Add(column=> {
    column.FieldName = "StartDate";
    column.ColumnType = MVCxGridViewColumnType.DateEdit;
});
settings.Columns.Add(column =>
{
    column.FieldName = "EndDate";
    column.ColumnType = MVCxGridViewColumnType.DateEdit;
    var dateProperties = column.PropertiesEdit as DateEditProperties;
    dateProperties.DateRangeSettings.StartDateEditID = "StartDate";
});
...

Examples

This example demonstrates how to implement a date range picker in ASPxGridView using a column's field name.