DateTime Picker data type conversion error

3 posts, 0 answers
  1. chris
    chris avatar
    11 posts
    Member since:
    Sep 2007

    Posted 15 Jan 2008 Link to this post

    Being relatively new to these controls and design in general, I;ve come up against an unexpected error meesage.

    I have a radgrid which pulls out data from a sql table, one field of which is a datetime in the database.  On entry to the table the date field is left as null for later updating.

    I have set up an edit template which includes a datetime picker. This countrol is bound to the field and when going into edit mode I'm getting the following message:

    Conversion from type 'Date' to type 'Integer' is not valid. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Conversion from type 'Date' to type 'Integer' is not valid.

    Is there a reason why the datetime picker control would store the values as an integer rather than a datetime string ?

    How can I get around this ?

    any help would be greatly appreciated
    ChrisS

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Jan 2008 Link to this post

    Hello Chris,

    You could take a look at the following links which described the usage of DatePicker with Grid:

     http://www.telerik.com/support/kb/article/b454K-gmg-b454T-cbb-b454c-cbb.aspx

    http://www.telerik.com/community/code-library/submission/b311D-dgkaa.aspx

    Please go through these resources and let us know if further help is needed.

    Kind regards,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. chris
    chris avatar
    11 posts
    Member since:
    Sep 2007

    Posted 22 Jan 2008 Link to this post

    That's great thanks - have used the the GridTemplateColumn in an auto generated form template.
Back to Top