Displaying a datagrid X rows at a time

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.
 
T

Teemu Keiski

W

William F. Robertson, Jr.

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
 
Q

quanga

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.
 
J

jasonkester

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top