I have a RadGrid with template colums and edit mode PopUp. So I can refer to text boxes like so:
Works fine, but when I use a form template (ie FormTemplate in EditFormSettings), that code no longer works, and the control isn't found any more.
Can anyone tell me how I should adapt the code?
Thanks, Steve
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) |
'----------------------------------------------------------------------- |
' If inserting, set the default competitor number, ie SiteNr + a seq nr |
'----------------------------------------------------------------------- |
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then |
If e.Item.OwnerTableView.IsItemInserted Then |
Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem) |
' Find the CompNr textbox |
Dim CompNrRadTextBox As RadTextBox = TryCast(item("CompNr").FindControl("CompNrTextBox"), RadTextBox) |
Works fine, but when I use a form template (ie FormTemplate in EditFormSettings), that code no longer works, and the control isn't found any more.
Can anyone tell me how I should adapt the code?
Thanks, Steve