Timepiker

2 posts, 0 answers
  1. ahmed
    ahmed avatar
    1 posts
    Member since:
    Jun 2010

    Posted 16 Jun 2010 Link to this post

    Unable to cast object of type 'System.DBNull' to type 'Telerik.Web.UI.RadTimeView'.

    i got that error
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jun 2010 Link to this post

    Hello Ahmed,

    I guess you are using RadTimePicker inside any DataBound control and getting error when fetching a null value. If so, you need to use DbSelectedDate instead of SelectedDate when binding the RadTimePicker.


    Here is an example:
     
        <telerik:GridTemplateColumn> 
            <ItemTemplate> 
                <telerik:RadTimePicker DbSelectedDate='<%#Eval("StartTime") %>' ID="RadTimePicker1" runat="server"
                </telerik:RadTimePicker> 
            </ItemTemplate> 


    -Shinu.
Back to Top