DynamicTemplate with Delete btn inside a GridView

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? :) :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top