Checking grid datasource?

  • Thread starter Thread starter VM
  • Start date Start date
V

VM

How can I check if a Windows Grid datasource is a datatable, dataset, or
dataview?

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

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

Back
Top