I've managed to get data between the RadGrid and the UserControl during databinding (i.e. as the control is being displayed, before the user enters any data) but I am not able to get any data back from the UserControl once the PerformInsert command is called. Upon examining the contents of e.Item, there are only 2 controls in the container both with type "Telerik.Web.UI.GridEditFormItem+EditFormTableCell". I'm using the following code to attempt to access the UserControl:
I've modeled the approach after the examples provided in the live demos and the documentation but nothing seems to be working. Any help would be greatly appreciated!
Thanks, Jason
Sub ChannelsList_InsertCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles ChannelsList.InsertCommand |
If Not e.Canceled Then |
Dim editedRow As GridEditableItem = CType(e.Item, GridEditableItem) |
Dim channelEditor As UserControl = CType(e.Item.FindControl(GridEditFormItem.EditFormUserControlID), UserControl) |
Dim channelsFile As ChnFile = CType(Session("ChannelsFile"), ChnFile) |
Dim channel As New Channel() |
With channel |
.Name = CType(editedRow.FindControl("tbxDisplayName"), RadTextBox).Text |
.Phonetic = CType(editedRow.FindControl("tbxPhonetic"), RadTextBox).Text |
.Comment = CType(editedRow.FindControl("tbxComment"), RadTextBox).Text |
End With |
End If |
End Sub |
I've modeled the approach after the examples provided in the live demos and the documentation but nothing seems to be working. Any help would be greatly appreciated!
Thanks, Jason