Unable to get value of datepicker

2 posts, 0 answers
  1. DogEars
    DogEars avatar
    79 posts
    Member since:
    Jun 2007

    Posted 02 Mar 2008 Link to this post

    I've got a datepicker inside a templatecolumn of a RadGrid. I'm specifically trying to use it in the edittemplatecolumn and I can't seem to get the value back from the data that is input.

     If (TypeOf e.Item Is GridEditableItem) AndAlso (e.Item.IsInEditMode) Then 
                Dim edititem As GridEditableItem = CType(e.Item, GridEditableItem) 
                Dim datepicker As RadDatePicker = CType(edititem("SpiralChngDelDate").FindControl("Picker1"), RadDatePicker) 
                Dim newdate As Object = datepicker.DbSelectedDate 
                SDS_Report.UpdateParameters.Add("SpiralChngDelDate", TypeCode.DateTime, "") 
                SDS_Report.UpdateParameters("SpiralChngDelDate").DefaultValue = newdate 

    I always get back a value of nothing and cannot figure out why.

  2. Plamen Peshev
    Plamen Peshev avatar
    885 posts

    Posted 04 Mar 2008 Link to this post

    Hi DogEars,

    We tried to reproduce the problem you reported, but without much success. Please refer to the attached project as part of our local tests. It worked as expected at our side.
    What is different in your case? What are we missing?

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top