G
gamesforums
Hi!
I need to add a delete button in a column for my GridView. It has to
be done in the codebehind.
Here's my code so far:
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 do something similar for my linkbutton and wire it up to
something like this in the codebehind:
Protected Sub roleList_RowDeleting(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles
RoleList.RowDeleting
End Sub
Any Suggestions?

I need to add a delete button in a column for my GridView. It has to
be done in the codebehind.
Here's my code so far:
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 do something similar for my linkbutton and wire it up to
something like this in the codebehind:
Protected Sub roleList_RowDeleting(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles
RoleList.RowDeleting
End Sub
Any Suggestions?