Paging question

Z

zdrakec

Hello all:

Suppose I have a datagrid and when I retrieve a datatable, and flake a
dataview off of that table to bind to my grid, my datatable has, say,
10,000+ records in it.
Suppose further that my datagrid has paging turned on, and I display 10
rows of data at a time.
Let us further suppose that I am caching the table in the page cache,
and retrieving it at datagrid binding time:

myDataView = New DataView(CType(Cache.Item("myDataTable"),DataTable)
myDataGrid.DataSource = myDataView
myDataGrid.DataBind()

Given that my datagrid will display only 10 rows at a time -
1) How many rows are in my dataview? All of them, or just the 10 being
displayed in the datagrid?
2) Where in memory is my datatable - on the server, or on the client?

I'm trying to figure out if I have a bandwidth issue whether I allow
the grid to display all of the rows, or if I page it...

Thanks much,
zdrakec
 
S

Scott M.

Given that my datagrid will display only 10 rows at a time -
1) How many rows are in my dataview? All of them, or just the 10 being
displayed in the datagrid?

DataViews don't "hold" any data at all, they are just filters of the
original data in your DataTable.
2) Where in memory is my datatable - on the server, or on the client?

All of your object instances are always held in memory on the server that
created them.
I'm trying to figure out if I have a bandwidth issue whether I allow
the grid to display all of the rows, or if I page it...

You may want to consider pulling down just 10 records from your database at
a time and make more trips to the data store than pulling down all of them
and not going back to the data store again.
 
Z

zdrakec

Hello Scott:

Ya know, I knew that about dataviews, so I must be getting senile :)

I'm wondering, not so much about holding that big a recordset on the
server memory, but how much of that data is actually being sent via my
network back to the client...all of it, or just the 10 records I have
my grid display at a time?

Thank you,
zdrakec
 
S

Scott M.

All of it is being sent to the client, regardless of how many records you
opt to show at any one time. This is why I suggest getting the records in
smaller batches and more often.
 
Z

zdrakec

That's what I figured, but I wasn't sure. Yes, I may well have to fetch
smaller batches...

Thanks for the info!

Cheers,
zdrakec
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top