PC Review


Reply
Thread Tools Rate Thread

Datagrid Datasource (Dataset , Dataview vs Datareader)

 
 
Al
Guest
Posts: n/a
 
      30th Dec 2003
in order to implement sorting, paging in a datagrid, can I
have the datasource of the datagrid a datareader or it
must be a dataset then I create a dataview and make it a
datasource of the datagrid?

The reason I am asking this question is because I already
created a datagrid and made its datasource a datareader,
yet, could not implement sorting or paging. Any idea of
how to approach it .
thanks
Al
 
Reply With Quote
 
 
 
 
William Ryan
Guest
Posts: n/a
 
      31st Dec 2003
Yep, that's the downside. If you want to sort or page, you'll need to
requery the DB if you are using a datareader. However, DataTables/DataViews
are much better suited to this task.

HTH,

Bill
"Al" <(E-Mail Removed)> wrote in message
news:09b201c3cf2d$4ecc36b0$(E-Mail Removed)...
> in order to implement sorting, paging in a datagrid, can I
> have the datasource of the datagrid a datareader or it
> must be a dataset then I create a dataview and make it a
> datasource of the datagrid?
>
> The reason I am asking this question is because I already
> created a datagrid and made its datasource a datareader,
> yet, could not implement sorting or paging. Any idea of
> how to approach it .
> thanks
> Al



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to manage a datagrid with 2 dataview as possible datasource? =?Utf-8?B?UHVjY2E=?= Microsoft C# .NET 7 24th Jun 2007 04:51 AM
cannot use DataRowView in ONItemBound event if datagrid datasource is Datareader? rockdale Microsoft ASP .NET 0 7th Jun 2006 06:35 PM
getting 'real' table datasource from grandchild datagrid that is based on dataview astro Microsoft VB .NET 3 12th Oct 2005 02:17 PM
dataview.datasource not binding or updating datagrid Ben Microsoft Dot NET 1 30th Jul 2003 06:31 AM
cast datagrid.datasource to dataset (datasource is table) newsgroper@yahoo.com Microsoft Dot NET Framework Forms 1 4th Jul 2003 04:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:00 AM.