How to get a collection of all available DataTales in a solution

  • Thread starter Thread starter Lucas Sain
  • Start date Start date
L

Lucas Sain

Hi,

My solution has several Typed DataSets. I want to create (on an
inherited form I use) a property that will let me select any of the
available DataTables. Any ideas?

Regards
Lucas
 
Hi Lucas,

If you want all this to work in design-time, your task seems to be rather
daunting. You will have to implement a custom property editor for your
property, and be able to scan through the solution to find all typed dataset
items to be listed in the property editor's combo box. I am even not sure
this is achievable without VSIP SDK.

As for run-time, I'd introduce a "registrar" class (actually, a custom
collection or a custom dictionary) that would hold the list of available
DataSets (probably System.Type instances) and also would be able to
instantiate datasets given their type. Your property would then interact
with the registrar class to obtain the desired dataset type based on its
index/name and instantiate if necessary.
 
Back
Top