PC Review


Reply
Thread Tools Rate Thread

Checking grid datasource?

 
 
VM
Guest
Posts: n/a
 
      20th May 2004
How can I check if a Windows Grid datasource is a datatable, dataset, or
dataview?

Thanks.



 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      20th May 2004
VM,

You could always get the name of the type that is the data source of the
data grid. However, once you have that, you would have to use the
DataMember property as well to see what it is really bound to, subsequently
casting the data source to an IListSource interface and passing the name of
the DataMember to the GetList method. You can then find the typename of the
implementation to see what it is bound to. However, this will always be a
data view, because when you bind to a table, the DefaultView property is
taken and that view is the one that is shown.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)


"VM" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I check if a Windows Grid datasource is a datatable, dataset, or
> dataview?
>
> Thanks.
>
>
>



 
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
Simple generic list as a datasource for a grid cowznofsky Microsoft ASP .NET 3 12th Jul 2007 09:34 PM
Changing the datasource.Id of a grid as its page is opening Monty Microsoft Dot NET 4 4th Apr 2006 07:23 AM
XML FILE as datasource to Grid view..? not able to remove the nodes..? =?iso-8859-1?Q?=BF_Mahesh_Kumar?= Microsoft ASP .NET 0 14th Oct 2005 11:47 AM
Simple Data Grid DataSource Problem =?Utf-8?B?VGhvbWFz?= Microsoft Dot NET Framework Forms 0 29th Dec 2004 05:47 PM
Easiest way to bind a grid datasource to a datatable =?Utf-8?B?S2VubmV0aA==?= Microsoft ASP .NET 2 18th Jan 2004 12:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:19 PM.