在我的用戶控件中,我有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