G
gamesforums
Hi!
I need to add a delete button to my GridView and wire up the onclick
event to a sub in my vb.code. The grid itself are created in the
codebehing - I have no aspx file that I can use for this.
Here's my code:
Protected WithEvents roleList As New GridView
'create templatefield column for role
Dim roleNameColumn As New TemplateField()
roleNameColumn.HeaderTemplate = New
DynamicTemplate(ListItemType.Header, "Roles")
roleNameColumn.ItemTemplate = New
DynamicTemplate(ListItemType.Item, "Role", False)
'add columns to the gridview
roleList.Columns.Add(roleNameColumn)
I need to add a delete button to my GridView and wire up the onclick
event to a sub in my vb.code. The grid itself are created in the
codebehing - I have no aspx file that I can use for this.
Here's my code:
Protected WithEvents roleList As New GridView
'create templatefield column for role
Dim roleNameColumn As New TemplateField()
roleNameColumn.HeaderTemplate = New
DynamicTemplate(ListItemType.Header, "Roles")
roleNameColumn.ItemTemplate = New
DynamicTemplate(ListItemType.Item, "Role", False)
'add columns to the gridview
roleList.Columns.Add(roleNameColumn)