Delete button inside DynamicTemplate in GridView

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)
 

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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top