【发布时间】:2015-03-13 04:01:35
【问题描述】:
我有一个 RadGrid,其 GridAttachmentColumn 名为“FileName”。我正在尝试从 ItemCreated 事件中的 GridDataItem 中获取(FindControl)控件。具体来说,我想要按钮控件(在这种情况下是 linkButton)。 item.FindControl("FileName") 总是返回 Nothing。
Protected Sub AttachmentsRadGrid_ItemCreated(sender As Object, e As GridItemEventArgs)
If TypeOf e.Item Is GridDataItem Then
Dim item As GridDataItem = TryCast(e.Item, GridDataItem)
If item IsNot Nothing Then
Dim FileName = item.FindControl("FileName") 'Always Nothing
If FileName IsNot Nothing Then
'Do something with it
End If
End If
End If
End Sub
【问题讨论】:
标签: telerik radgrid findcontrol