Create DataGrig ButtonColumn Dinamically

R

ruca

Hi gurus,

I need to create a ButtonColumn in my code for using in my datagrig. What
happens is that I create this button in code, but then when I click him,
nothing happens.
I have this in my vb code:
---------------------------------
Dim bc As New ButtonColumn
bc.HeaderText = ""
bc.Text = "See Details"
bc.CommandName = "Select"
dgMyGrid.Columns.AddAt(0, bc)

//then I have the fucntion that should run when click in button
Sub SeeDetails(ByVal Sender As Object, ByVal e As DataGridCommandEventArgs)

If e.CommandName <> "Page" Then
'Place my code here
End If

End Sub
 
R

ruca

This is ASP.NET and buttoncolumn don't have Id's.
And don't have OnInit method. Have Form_Load event.
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top