Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Paging question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zdrakec - 19 Jul 2005 21:37 GMT
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
Scott M. - 19 Jul 2005 22:07 GMT
> 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.

> Thanks much,
> zdrakec
zdrakec - 19 Jul 2005 22:25 GMT
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
Scott M. - 20 Jul 2005 00:50 GMT
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.

> Hello Scott:
>
[quoted text clipped - 7 lines]
> Thank you,
> zdrakec
zdrakec - 20 Jul 2005 12:01 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.