Praba, thanks for the reply and link. However, the link shows a technique that:
(A) Loads all records into a Session object.
The issue I see with loading all records into Session, is say I have 15,000 records - they'll all be loaded into the web server memory for each end user. Hence, this does not propoerly solve the performance problem.
The tutorials from 2006, (listed above), only retrieves the subset of records e.g. 10 records only, every time the user clciks the next page. It does not load 15,000 recods into memory for each user.
(B) Uses only code behind.
Iinstead of declarative - except fot the page index change event, which may require a couple of lines of code behind.
Does anybody have any idea on how to get the new GridView custom paging in .Net v4.5 to work with the ObjectDataSource?
Keep it Simp...
Member
549 Points
264 Posts
GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 25, 2012 11:55 PM|LINK
Hi, in ASP.NET v4.5, how does the new GridView.AllowCustomPaging and GridView.VirtualItemCount properties work?
Apart from high level instructions, there are no examples in the documentation:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.allowcustompaging.aspx
ASP.NET 2.0 did have two tutorials released back in 2006:
http://www.asp.net/web-forms/tutorials/data-access/paging-and-sorting/efficiently-paging-through-large-amounts-of-data-cs
http://www.asp.net/web-forms/tutorials/data-access/paging-and-sorting/sorting-custom-paged-data-cs
But obviously did not include the new V4.5 custom paging features released in 2012.
Does anybody know how to get the new GridView custom paging and sorting to work by short example?
Thanks!
PS. I'm using an ObjectDataSource with GridView
Prabakaran_r
Member
672 Points
111 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 26, 2012 03:38 AM|LINK
This page has the sample code about how to implement/use AllowCustomPaging and VirtualItemCount
http://www.byteblocks.com/post/2012/03/20/Use-Custom-Paging-in-Grid-View.aspx
Mark the response which answers your question.
Keep it Simp...
Member
549 Points
264 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 26, 2012 05:12 AM|LINK
Praba, thanks for the reply and link. However, the link shows a technique that:
(A) Loads all records into a Session object.
The issue I see with loading all records into Session, is say I have 15,000 records - they'll all be loaded into the web server memory for each end user. Hence, this does not propoerly solve the performance problem.
The tutorials from 2006, (listed above), only retrieves the subset of records e.g. 10 records only, every time the user clciks the next page. It does not load 15,000 recods into memory for each user.
(B) Uses only code behind.
Iinstead of declarative - except fot the page index change event, which may require a couple of lines of code behind.
Does anybody have any idea on how to get the new GridView custom paging in .Net v4.5 to work with the ObjectDataSource?
sarathi125
Star
13599 Points
2691 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 26, 2012 05:17 AM|LINK
Hi,
Try this one.
http://www.codeproject.com/Articles/16238/GridView-Custom-Paging
http://forums.asp.net/t/1774183.aspx/1?How+to+display+Huge+No+of+data+from+database+in+a+Single+GridView+Without+Compromising+Performance+
Remember to click Mark as Answer on the post that helps to others.
My Blog :MyAspSnippets
Keep it Simp...
Member
549 Points
264 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 26, 2012 06:27 AM|LINK
Both links show how to do custom paging circa 2006. I know how to do this as mentioned already.
My question is: how do you use the NEW GridView custom paging in ASP.NET v4.5, recently released in 2012?
sarathi125
Star
13599 Points
2691 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 26, 2012 06:53 AM|LINK
Hi,
Check this,
http://www.c-sharpcorner.com/UploadFile/rohatash/gridview-paging-sample-in-Asp-Net/
Remember to click Mark as Answer on the post that helps to others.
My Blog :MyAspSnippets
Keep it Simp...
Member
549 Points
264 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Oct 26, 2012 07:32 AM|LINK
Thanks for help, but I am not sure you fully understand my question.
I am not merely talking about posts released in 2012. I am referring to the newsest custom paging technique in v4.5 for the GridView.
The above link does not use the new GridView.AllowCustomPaging and GridView.VirtualItemCount properties now available in ASP.NET V4.5.
Does anyone know how to hook this up to an ObjectDatsSource?
DukeAmes
Member
66 Points
15 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Feb 19, 2013 03:11 PM|LINK
Did you find an example? Please let us know if you did. Thanks!
Keep it Simp...
Member
549 Points
264 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
Feb 19, 2013 07:45 PM|LINK
No I have not found an example.
It's a case of new feature with inadequate documentation.
Keep it Simp...
Member
549 Points
264 Posts
Re: GridView.AllowCustomPaging in ASP.NET v4.5 - efficeient paging and sorting
May 17, 2013 06:50 AM|LINK
BUMP
PS. Others have the same question, without an adequate answer:
http://stackoverflow.com/questions/12926266/how-does-the-asp-net-4-5-gridview-allowcustompaging-property-make-this-simpler