在我的用户控件中,我有gridview,并且这个网格是使用Itemplate以编程方式创建的。在InstantiateIn方法中,我有这个代码。ITemplate和linkbutton点击事件
我想将Click事件连接到此LinkButton,并在后面的代码中使用此事件。 这是GridViewTemplate的构造是如何实现了Itemplate
Public Sub New(ByVal type As ListItemType, ByVal colname As String, Optional ByVal infoType As String = "")
'Stores the template type.
_templateType = type
'Stores the column name.
_columnName = colname
_infoType = infoType
_columnID = columID
End Sub
,我必须从用户控制这一呼吁:
bfield.ItemTemplate = New GridViewTemplate(ListItemType.Item, dt.Columns(col).ColumnName, "label")
哪里是
Dim bfield As TemplateField = New TemplateField()
我有公共类如何实现这个ITem盘子。我不能使用这个。我尝试使用代表,但没有任何运气。 – amchoni 2010-11-26 22:07:13