datagrid custom (dynamic) pager build at runtime?

G

Guest

Hi guys!

I have built a custom pager for my datagrids like in the picture:

http://i173.photobucket.com/albums/w65/patrickdrd/dev/grid.jpg

I would like to move that inside the datagrid (on the footer),

but I'm having trouble with the event,

I can't catch the button's click event,

code follows:

Dim btnFirst1 As New Button
With btnFirst1
.ID = "btnFirst1"
.CommandName = "First"
.CssClass = "inpNavFirst"

''.Attributes("runat") = "server"
'.ID = "btnFirst1"
'.CssClass = "inpNavFirst"
''.Attributes("OnCommand") = "btnFirst1_Click"
'.Attributes("CommandName") = "First"
''.Attributes("onserverclick") = "btnFirst1_Click"
''AddHandler .Click, AddressOf btnFirst1_Click
End With

fcell = New TableCell
fcell.Controls.Add(btnFirst1)
fcell.ColumnSpan = dgCustomers.Columns.Count
fcell.HorizontalAlign = HorizontalAlign.Center

Dim dgItemFooter As New DataGridItem(0, 0, ListItemType.Footer)
dgItemFooter.Cells.Add(fcell)
dgCustomers.Controls(dgCustomers.Controls.Count -
1).Controls.Add(dgItemFooter)



I tried anything you can see in comments,

nothing worked!

Can somebody help me out please?

Thanks in advance!
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top