By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,089 Members | 1,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,089 IT Pros & Developers. It's quick & easy.

datagrid custom (dynamic) pager build at runtime?

P: n/a
Hi guys!

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

http://i173.photobucket.com/albums/w...d/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!

May 6 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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,
Use "Command" event of the datagrid.
And then specify the "CommandName" and "CommandArgument" for the button.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
May 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.