Hi
I have a RadGrid as follows:
Master (editable)
+ Detail1 (non-editable)
+ Detail2 (insert and editable)
In the MasterView is a status value. The following code works except for the FindControl of InitInsertButton.
How do I find the InitInsertButton control in the detail2 view in the ItemDataBound event?
Phil
I have a RadGrid as follows:
Master (editable)
+ Detail1 (non-editable)
+ Detail2 (insert and editable)
In the MasterView is a status value. The following code works except for the FindControl of InitInsertButton.
Protected Sub invoiceGrid_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) |
If TypeOf e.Item Is GridDataItem Then |
Dim _item As GridDataItem = e.Item |
If (_item.OwnerTableView.Name = "InvoiceMasterView") Then |
' ... 8 line removed, very similar to following code ... |
ElseIf (_item.OwnerTableView.Name = "InvoiceDetailAmounts") Then |
Dim _parentItem As GridDataItem = _item.OwnerTableView.ParentItem |
Dim _status As Integer = CInt(_parentItem("InvoiceStatus").Text) |
If Not (Helper.GetStatusUpdatable(_status)) Then |
Dim _ctl As Control = _item.OwnerTableView.FindControl("InitInsertButton") |
If Not _ctl Is Nothing Then |
CType(_ctl, LinkButton).Enabled = False |
End If |
Dim _editCtl As LinkButton = CType(_item("AmountsEditCommandColumn").Controls(0), LinkButton) |
If Not _editCtl Is Nothing Then |
_editCtl.Enabled = False |
End If |
End If |
End If |
End If |
End Sub |
How do I find the InitInsertButton control in the detail2 view in the ItemDataBound event?
Phil