Can't Get the value out of a RadDateTimePicker

2 posts, 0 answers
  1. mac
    mac avatar
    137 posts
    Member since:
    May 2008

    Posted 22 May 2008 Link to this post

    Hi. I am new to these controls.
    I have the following issue. trying to insert the value of a RadDateTimePicker into a SLQ2000 db. from an emptDataTemplate. My issue is in obtaining the value of that Picker.. I don't know why this is so difficult.

    I have the following:

    Dim

    EducDate As RadDateTimePicker = TryCast(GridView2.Controls(0).Controls(0).FindControl("NoDataEducationDate"), RadDateTimePicker)


    Dim EdDate As New SqlParameter("@EducationDate", SqlDbType.DateTime, 30, ParameterDirection.Input)
    EdDate.Value = EducDate  'THIS IS MY PROBLEM AREA
    insertParameters.Add(EdDate)


    DSEducation.Insert()

    'insert params Sub

    Protected

    Sub DSEducation_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs) Handles DSEducation.Inserting
    e.Command.Parameters.Clear()
    For Each p As SqlParameter In insertParameters
    e.Command.Parameters.Add(p)
    Next

    End Sub
  2. mac
    mac avatar
    137 posts
    Member since:
    May 2008

    Posted 22 May 2008 Link to this post

    EducDate.SelectedDate.ToString is the answer.. was looking for that for days.

Back to Top