Custom Paging in DataGrid

  • Thread starter Daniel Walzenbach
  • Start date
D

Daniel Walzenbach

Hi,

I want to create my own custom pager for a DataGrid. Does anybody know how
this can be done?

Thanks for your help!
Regards,

Daniel
 
S

Steven Cheng[MSFT]

Hi Daniel,

Welcome to ASPNET group.
Regarding on the "creating custom pager for webform datagrid", I remember
that there was a former thread discussing on the similiar problem where we
discussing together:

http://groups-beta.google.com/group/microsoft.public.dotnet.framework.aspnet
..webcontrols/browse_thread/thread/eeaac557c9a32a20/fb063bcc9cfd3a60?q=asp.ne
t+datagrid+custom+pager&rnum=1&hl=en#fb063bcc9cfd3a60

In that thread, I suggest that we use the DataGrid's ItemCreated event to
access the grid's Pager template , like:

private void dgPager_ItemCreated(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Pager)
{

TableCell tc = e.Item.Controls[0] as TableCell;


if(tc != null)
{
// create own custom pager controls
}
}
}

Do you think this ok or have you encountered any problem when implementing
the custom pager in this way? If there're any paticular requirement, please
feel free to let me know.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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,888
Messages
2,569,965
Members
46,294
Latest member
HollieYork

Latest Threads

Top