Binding a RadDateRangePicker to a data source is easy provided through the DbRangeSelectionStartDate and DbRangeSelectionEndDate properties.
They work almost like the RangeSelectionStartDate and RangeSelectionEndDate properties, but will not throw an exception when same has been given null values.
The example demonstrates binding a RadGrid control to a DataTable with dates, containing null values.
Binding the dates for the RadDateRangePicker in template column is done via the DbRangeSelectionStartDate and DbRangeSelectionEndDate properties:
<EditItemTemplate>
<telerik:RadDateRangePicker ID="RadDateRangePicker1" CssClass="RadDateRangePicker" runat="server"
DbRangeSelectionStartDate='<%# Bind("StartDate") %>'
DbRangeSelectionEndDate='<%# Bind("EndDate") %>'>
</telerik:RadDateRangePicker>
</EditItemTemplate>
This demo illustrates how daterangepicker can be used inside an edit template of a GridTemplateColumn. Additionally, the DbRangeSelectionStartDate and DbRangeSelectionEndDate properties of RadDateRangePicker are of nullable type and hence support null values.