Specified Cast in Not Valid.

1 posts, 0 answers
    D.SRINIVASA avatar
    34 posts
    Member since:
    Oct 2010

    Posted 08 Sep 2011 Link to this post

    i am D.Srinivasa,

                           in my project i have a RadGrid to Display a Data from the DataBase, in my RadGrid i have a RadDatePicker Control to display a date from backend,  here enabled the maximum date condition in Raddatepicker,

    the following coding is the condition for maximum date operation in RadDatePicker, it checks whether the database can have the data or not, if data is available then it sets the maximum date to that RadDatePicker,

    some times it works perfectly but some times it returns error.. 

    it returns an error is Specified Cast in Not Valid..

    Code Is : 

    <telerik:GridTemplateColumn UniqueName="gridActStart" HeaderText="Actual Start" AllowFiltering="false" ItemStyle-HorizontalAlign="Center"><br>
    telerik:RadDatePicker ID="actstart" runat="server" MaxDate='<%#If((Eval("early_start_display") IsNot DBNull.Value), Convert.ToDateTime(Eval("early_start_display")), CType("10/10/2011", System.Nullable(Of DateTime))) %>' Width="100px" Calendar-ShowOtherMonthsDays="false" Calendar-ShowRowHeaders="false" DbSelectedDate='<%# Bind("actual_start") %>' DateInput-DateFormat="MM/dd/yyyy">                     

    and the following attachment is the database for my application. How to resolve this problem,
Back to Top