Problem with Null when using with RadGrid

2 posts, 0 answers
  1. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 09 Mar 2009 Link to this post

    COPIED THIS OVER TO THE RADGRID FORUM


    Hi

    This is my aspx code for a RadDatePicker used in an Edit template on a RadGrid.

    The problem is when I try to add new record the selected date doesn't exist and I get a cast error, I've tried an iif and isdbnull. but cant get it to work, can anyone help.

                                    <div>

                                        <label class="gridlabel">Review Date:</label>

                                        <telerik:RadDatePicker  ID="txtReviewDate" runat="server" MinDate="2000-01-01" EnableEmbeddedSkins="False" Skin="Expert" EnableEmbeddedBaseStylesheet="False"  Width="100px" SelectedDate='<%# Eval("ReviewDate") %>' >

                                        <DateInput EnableEmbeddedSkins="False" LabelCssClass="radLabelCss_Expert" Skin="Expert" DateFormat="dd/MMM/yyyy"></DateInput>

                                        <Calendar EnableEmbeddedSkins="False" Skin="Expert" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x" FastNavigationNextImage="~/App_Themes/Expert/Calendar/fastNavRight.gif" FastNavigationPrevImage="~/App_Themes/Expert/Calendar/fastNavLeft.gif" NavigationNextImage="~/App_Themes/Expert/Calendar/arrowRight.gif" NavigationPrevImage="~/App_Themes/Expert/Calendar/arrowLeft.gif"></Calendar>

                                        <DatePopupButton CssClass="radPopupImage_Expert" HoverImageUrl="../App_Themes/Expert/Calendar/datePickerPopupHover.gif" ImageUrl="../App_Themes/Expert/Calendar/datePickerPopup.gif"/>

                                        </telerik:RadDatePicker>

                                    </div>

    Thanks

    Andy

     

     

     

     

     

     

     

  2. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 10 Mar 2009 Link to this post

    Hello Andy,

    For the convenience of our community I pasted the same link here:

    Using RadInput Controls Inside Data-Bound Controls


    Best regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top