This is a migrated thread and some comments may be shown as answers.

Can't Get the value out of a RadDateTimePicker

1 Answer 85 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
mac
Top achievements
Rank 1
mac asked on 22 May 2008, 04:26 PM
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

1 Answer, 1 is accepted

Sort by
0
mac
Top achievements
Rank 1
answered on 22 May 2008, 04:37 PM

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

Tags
Calendar
Asked by
mac
Top achievements
Rank 1
Answers by
mac
Top achievements
Rank 1
Share this question
or