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!
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!