1

Regarding ASP.NET's GridView server control:

Can I bind to a datasource in the code-behind, load the entire resultset, and then implement client-side paging without postbacks?

If this isn't possible with GridView, I'm willing to implement a custom solution.

EDIT: My GridView instance sits inside of a nyroModal (jQuery) pop-up div, which is why I need a non-postback solution.

Jim G.
  • 15,141
  • 22
  • 103
  • 166
  • Do you need to sort just the results that fill your grid? If your total result set is greater than the number being displayed then you may want to sort across all of them which would necessitate fetching, sorting, then chunking the result set being displayed. Or do you just want to sort within the current set? – Keplerf1 Jul 29 '10 at 15:39

3 Answers3

1

The jQuery tablesorter pager plug-in might work.

Jim G.
  • 15,141
  • 22
  • 103
  • 166
0

I would suggest using some custom form of javascript templating instead. You'll have to implement more or less all of that anyway with a gridview, but here someone has already thought about the client side aspect.

Community
  • 1
  • 1
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
0

It is possible, but that would mean that you'd have to send the entire result set to the client at the beginning and that would make the initial page load slower (depending on how many records you have in the result set).

I'd say use AJAX to post back and get the data for the next page in the grid.

del.ave
  • 1,888
  • 5
  • 17
  • 23