The structure is
1. RadGrid
2. MasterTableView
3. EditFormSettings
4. Form Template
5. Then tables/rows/cells containing labels, textboxes, etc.
From code behind I can access all the asp and telerik items in the tables and retrieve any data for further use in my application by using the following code:
If e.CommandName = RadGrid.UpdateCommandName Then
If TypeOf e.Item Is GridEditFormItem Then
Dim item As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
Dim theClient As TextBox = DirectCast(item.FindControl("txtClient"), TextBox)
Dim theOrder As TextBox = DirectCast(item.FindControl("txtOrder"), TextBox)
Dim theRadDateOrder As RadDatePicker = DirectCast(item.FindControl("RadDatePickerOrderDate"), RadDatePicker)
etc.
I now have the value from the dbSelectedDate:
Dim theDateOrderDate As DateTime = theRadDateOrder.DbSelectedDate
Dim theDateOrderMonth As String = theDateOrderDate.ToString("MMMM")
Dim theDateOrderDay As String = theDateOrderDate.Day
And I now have a month and I have a day broke out.
Now within the form template is an asp:textbox that I want to update/insert/place the month value into. I also have a RadNumericTextBox that I want to update/insert/place the day value into.
What I want to do is update the month and day on the form when the date is selected with the RadDatePicker.
All the above was figured out by searching the internet and putting the pieces together.
I have not been able to find even a starting point on my question, it may be in the above code, but I do not see it yet.
My question is how do I do this from code behind as I cannot access the controls directly as they are within the Form Template?
Thank you for your time. Dale