RadDatePicker Null value Issue

4 posts, 0 answers
  1. Ramesh
    Ramesh avatar
    6 posts
    Member since:
    Apr 2014

    Posted 19 Jun 2014 Link to this post

    Hi All,

    I have webform with three bread crumbs for a registration process.

    All the three bread crumbs are in a single webpage with different views in it. In first view these two RadDatePicker controls (one exam start date and other exam end date).

    In edit mode these RadDatePicker.SelectedDate are becoming null so, I am facing an issue/Error "Nullable object must have a value"

    Please help on it.

    regards,
    R
  2. Ramesh
    Ramesh avatar
    6 posts
    Member since:
    Apr 2014

    Posted 19 Jun 2014 in reply to Ramesh Link to this post

    Please find the code below:

    <telerik:RadDatePicker ID="startDate" runat="server" Width="90px" Calendar-ShowRowHeaders="false" AutoPostBack="true">
                                                    <DateInput ReadOnly="true">
                                                    </DateInput>
                                                    <Calendar>
                                                        <SpecialDays>
                                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                                        </SpecialDays>
                                                    </Calendar>
                                                </telerik:RadDatePicker>
                                                <asp:RequiredFieldValidator ControlToValidate="startDate" Display="None" ErrorMessage="start Date Required"
                                                    ValidationGroup="ED" SetFocusOnError="true" runat="server" ID="RequiredFieldValidator9"></asp:RequiredFieldValidator>

    <telerik:RadDatePicker ID="EndDate" runat="server" Width="90px" Calendar-ShowRowHeaders="false" AutoPostBack="true">
                                                    <DateInput ReadOnly="true">
                                                    </DateInput>
                                                    <Calendar>
                                                        <SpecialDays>
                                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                                        </SpecialDays>
                                                    </Calendar>
                                                </telerik:RadDatePicker>
                                                <asp:RequiredFieldValidator ControlToValidate="EndDate" Display="None"
                                                    ValidationGroup="ED" ErrorMessage="End Date Required" SetFocusOnError="true"
                                                    runat="server" ID="RequiredFieldValidator11"></asp:RequiredFieldValidator>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eyup
    Admin
    Eyup avatar
    3009 posts

    Posted 24 Jun 2014 Link to this post

    Hi Ramesh,

    I have created a sample web site to test the described behavior using the provided code snippet. On my side the validation works as expected after configuring the ValidationGroup and Display properties of the validators. Please run the attached application and let me know about the result.

    Regards,
    Eyup
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Ramesh
    Ramesh avatar
    6 posts
    Member since:
    Apr 2014

    Posted 03 Jul 2014 Link to this post

    Thank you Eyup
Back to Top