Hi,
I would like to know as to how one could implement custom paging in asp.net.
Any insight or reference materials or articles that you could point me to would be greatly appreciated.
Thanks,
Gomzi.
11 5113 Frinavale 9,735
Recognized Expert Moderator Expert
Hi,
I would like to know as to how one could implement custom paging in asp.net.
Any insight or reference materials or articles that you could point me to would be greatly appreciated.
Thanks,
Gomzi.
Custom paging?
Custom movement between pages?
Custom paging for a GridView object?
I don't understand.
-Frinny
Custom paging?
Custom movement between pages?
Custom paging for a GridView object?
I don't understand.
-Frinny
Hi Frinny,
I would like to implement custom paging for a gridview.
Any idea as to how I could achieve that ?
Thanks,
Gomzi.
Frinavale 9,735
Recognized Expert Moderator Expert
Hi Frinny,
I would like to implement custom paging for a gridview.
Any idea as to how I could achieve that ?
Thanks,
Gomzi.
Have you tried implementing the function that handles the PageIndexChange d event for the GridView?
Have you tried implementing the function that handles the PageIndexChange d event for the GridView?
Till now I used to do paging wherein i got the whole data and stored it in a dataset.
But now I felt the need for custom paging.
So, I decided to code one using the below mechanism.
A gridview for displaying the data.
Two link buttons for previous and next.
And then retrieving 10 rows depending on the page number which I am getting through previous and next.
But the point where I am stuck is that I am currently unable to retrieve the records depending on the page number. i.e. how do I retrieve records depending on the page number?
I am using mysql as the database.
Frinavale 9,735
Recognized Expert Moderator Expert
Till now I used to do paging wherein i got the whole data and stored it in a dataset.
But now I felt the need for custom paging.
So, I decided to code one using the below mechanism.
A gridview for displaying the data.
Two link buttons for previous and next.
And then retrieving 10 rows depending on the page number which I am getting through previous and next.
But the point where I am stuck is that I am currently unable to retrieve the records depending on the page number. i.e. how do I retrieve records depending on the page number?
I am using mysql as the database.
I don't understand why you would go to all this trouble when the GridView does the paging etc. for you. There's no reason to deviate from something that is so standard.
I strongly recommend using the paging supplied by your GridView.
It will save you a lot of time and headache.
Don't re-invent the wheel
-Frinny
I don't understand why you would go to all this trouble when the GridView does the paging etc. for you. There's no reason to deviate from something that is so standard.
I strongly recommend using the paging supplied by your GridView.
It will save you a lot of time and headache.
Don't re-invent the wheel
-Frinny
Ya Frinny, thats true " Don't re-invent the wheel ".
But I guess, its already been re-invented. It's just that I am unaware of it. :)
Also, why I am trying to do such a thing is because, my database has a lot of records, and if everytime I bind all the records to the gridview i.e. for every page request, then the response will be extremely slow in comparison to one wherein one binds only the necessary records(dependi ng on the page requested by the user).
Frinavale 9,735
Recognized Expert Moderator Expert
Ya Frinny, thats true " Don't re-invent the wheel ".
But I guess, its already been re-invented. It's just that I am unaware of it. :)
Also, why I am trying to do such a thing is because, my database has a lot of records, and if everytime I bind all the records to the gridview i.e. for every page request, then the response will be extremely slow in comparison to one wherein one binds only the necessary records(dependi ng on the page requested by the user).
Hmmm, I see your problem.
I'm not sure how to help you there.
Hopefully someone else will help solve the problem with the slowness.
If not, post a new question asking how to maximize the response time during paging using a GridView.
Sorry I couldn't be more helpful,
-Frinny
Hmmm, I see your problem.
I'm not sure how to help you there.
Hopefully someone else will help solve the problem with the slowness.
If not, post a new question asking how to maximize the response time during paging using a GridView.
Sorry I couldn't be more helpful,
-Frinny
No probs. Will post the question now.
Thanks a lot for the interest anyway.
Gomzi.
Till now I used to do paging wherein i got the whole data and stored it in a dataset.
But now I felt the need for custom paging.
So, I decided to code one using the below mechanism.
A gridview for displaying the data.
Two link buttons for previous and next.
And then retrieving 10 rows depending on the page number which I am getting through previous and next.
But the point where I am stuck is that I am currently unable to retrieve the records depending on the page number. i.e. how do I retrieve records depending on the page number?
I am using mysql as the database.
In this Example i have used Cache variable to hold the DataView Object in Cache Memory.
Why..?
I'm going to access BindGrid() Method many time So.. why should i go for server said again and again. So to avoid that i'm using Cache "Cache["MemberData "] = dvue;" for other Caches you can use Session Or ViewState also.
Then you have asked " retrieving 10 rows depending on the page number "
To achive this " dvue.RowFilter =....." is used.
If you bind the DataSet directly (with all records) to the DataGrid Or GridView performance will go down when no of records are more.
But in this method we are binding 10 records each time so performance is high.
(Faster)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Stephen |
last post by:
This is a real brain-teaser and i'd really appreciate it if someone can try
and understand what im trying to do and give me a few pointers or ideas to
help me work out my problem.
Im basically using the example of CUSTOM PAGING on a DataGrid on this page:
http://www.dotnetjunkies.com/Tutorial/EA868776-D71E-448A-BC23-B64B871F967F.dcik
and im trying to add extra functionality in the DataGrid Paging - Custom
Paging example. I'm able to get...
|
by: akn |
last post by:
Hi,
I am trying to do custom paging on my datagrid. Most of the examples
that i found are with next previous. I need to use page numbers such
that when a user clicks on page 2 then he is taken to page 2 and while
on page 2 that link becomes disabled but all the other page numbers
1,3,4,5, are enabled.
How can i use page numbers with custom paging?
|
by: Maziar Aflatoun |
last post by:
Hi,
I'm having problems with Custom Paging. Most of the articles out there show
that the custom paging is done as the following article.
http://authors.aspalliance.com/aspxtreme/sys/Web/UI/WebControls/DataGridClassAllowCustomPaging.aspx
(Check the example 'Custom Paging with AutoIncrement Data Model'). However,
the assumption here is that the rows are all there 1,2,3,4,5,6,7,8 but
that's not the case with many database tables. You can...
|
by: asad |
last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom
paging bcoz data is too heavy so pls tell me how can i use custom paging in
ASP.NET
Thanks
|
by: asad |
last post by:
Hello, i want to do Custom paging i'm using MS Access Database when i'm using
SQL SERVER Database Custom paging work ok but when i'm using MS Access
Database it does not work pls tell me how can i do custom paging with MS
Access Database pls tell me.
Thanks
| |
by: thechaosengine |
last post by:
Hi all,
Can somebody tell me if the built in paging support for the datagrid works
when using a custom collection and a custom business object as the data.
I was well pleased when I found that I could bind a custom class to the datagrid.
Now however, I'm worried that paging is buggered because I'm using custom
classes.
Should this be possible and if not, would custom paging work?
|
by: Wiktor Zychla [C# MVP] |
last post by:
Hello,
just two sad thoughts on GridView's custom paging support, the first one
rather general and second one rather specific.
First one: I really miss the DataGrid custom paging support with
AllowCustomPaging and VirtualCount. The new declarative model with
ObjectDataSource is much worse! - the amount of "words" you have to type is
comparable (few methods in C# vs declarative binding with ObjectDataSource),
however the static typing...
|
by: Sachin |
last post by:
Hi All,
I am using ASP.NET 2.0 Tree control to display hierarachical data.
However because of the size of the data, tree takes ages to load on the
browser.
For that reason, I want to build custom paging solution similar to custom
paging in datagrid/gridview...
|
by: Roy |
last post by:
Hey all,
I must be losing my touch. I have made many pages in the 1.1 framework
that utilize custom bidirectional paging in datagrids. We've converted
over to 2.0 and I've been trying to use the built-in functionality of
gridviews and objectdatasource's to accomplish the same thing (w/o
resorting to the 1.1 methodology). I discovered two very nice and
comprehensive articles concerning this:
Custom Paging in ASP.NET 2.0 with SQL Server...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |