Displaying a datagrid X rows at a time

  • Thread starter Thread starter quanga
  • Start date Start date
Q

quanga

Hi-
I have a datagrid that in some cases can be several thousand rows in
length. What I'd like it to do is have the data pushed to the browser
after every, say, 100 rows or so. Kind of a "response.flush" effect--
at a certain recurring point in the process, take what we've got and
send it to the browser. Is this possible?

Thanks.
 
Not without using paging as Teemu recommended. It seems as though you still
want to show the 1000+ rows at a time. The DataGrid is rendered as an html
table. Internet Explorer renders table in one pass. IOW, the table (grid)
will not be show to the user on their machine until the whole table has been
received and parsed by the browser.

bill
 
Yeah Bill, that's more of what I had in mind; we want to show the whole
list and avoid paging if we can. Sounds like we might have to split up
the data into separate datagrids somehow. Thanks to you and Teemu for
your help.
 
Yeah Bill, that's more of what I had in mind; we want to show the whole
list and avoid paging if we can. Sounds like we might have to split up
the data into separate datagrids somehow.

You could do Response.Flush() if you didn't use bound controls like the
DataGrid or Repeater. Render the page like it was classic ASP. Render
the tableHeader, flush, then do a foreach on your rows, rendering HTML
rows and flushing periodically.

It's easy enough to do. In fact, it's exactly how you did it 3 years
ago.


Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
Back
Top