[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 816
  • Last Modified:

How to implement Custom gridview paging

Currently i want to accomplish custom paging in my gridview.Initially i was doing it by Default paging.In google i can get only objectdatasource control but i want it through the use of dataset.How to set a page number in the textbox field and then through dropdownlist i can go to the required page.
0
Sukeshjph
Asked:
Sukeshjph
  • 2
  • 2
1 Solution
 
Mortaza DoulatyCommented:
You need to define a class and use your dataset inside the class to implement custom paging.
Then you just need to use a object datasource and use your own class as the datasource for object datasource.
For more detailed information, study Pro ASP .NET 2 by Matthew McDonald, Apress.
0
 
sasapopovicCommented:
Hi Sukeshjph,

Here are a few articles that explain (with source code) how you can implement your custom pager:
 - http://kpumuk.info/asp-net/gridview-with-custom-digg-like-pager/
 - http://www.dotnetbips.com/articles/7684926d-dd3e-493e-80df-ace8863245e0.aspx

I hope this will help you.

Cheers,
Sasa
0
 
SukeshjphAuthor Commented:
Can i not achieve my objective to set the custom page index through only onrowcreated and onrowcommand event of the gridview if i am not required to use objectdatasource control for this.

We have dataacess layers which returns us dataset.

What i think i can simply put one textbox...at runtime somebody type the pagesize and from another dropdownlist (both present in the pager template )i can select which page out of available pages i want to navigate directly.

 
0
 
sasapopovicCommented:
I think I understand now what you need. Please check this article that explains how you can implement such custom paging: http://www.codeproject.com/KB/aspnet/GridViewNeatPaging.aspx
0
 
SukeshjphAuthor Commented:
thank you i think i have got my solution.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now