DataSet RRS feed

  • Question

  • Hi folks

    I'm trying to build an derived Class from System.Data.DataSet


    public class MyDataSet : DataSet
    public MyDataSet()

    My problem is that :
    1) if i try to install my assembly as it is to toolbox nothing happens
    2) if i add
    [tooboxitem[true] attribute to my class  then component installed to tollbox but
     i lost all extra futures of dataset as Tables and Relations

    Any idea ????



    Tuesday, September 13, 2005 2:25 PM

All replies

  • Hi,

    what is your goal in adding a custom made dataset to the toolbox?
    Tuesday, September 13, 2005 3:18 PM
  • Thanks for your replay

    Simply thats say i want to add an String property wich is not exists on Base class System.data.dataSet and use this dataSet in my program.

    Let me explain

    I'm building an framework wich our developers will use to build applications.

    So i want to add some extra properties wich are extends current DataSet ( and used by framework) and use this extended DataSet in our application to automate some things.
    So extensibility is no problem .

    The problem is after adding on toolbox and droping new component to a form "Tables" and "Relations" properties does not appears on property grid on design enviroment. And i cannot understand what i'm doing wrong

    Tuesday, September 13, 2005 3:27 PM
  • Is it possible that you also need to run the base class's constructor?  If so, your constructor would be declared as:

    public MyDataSet() : base()
    Tuesday, September 13, 2005 5:42 PM
  • Thansk for the replay.

    No unfortunately this is not solved the problem.

    I'm cannot understand seens "Tables" and "Relations" are properties of the DataSet class why there are not shown on property editor of the descendant class.

    Is there a possiblity that there are some kind of sealed.

    I'm missed to say that the problem is only on prortyeditor of the IDE of VS.
    On coding 
    MyDataSet  dt = new MyDataSet();
    dt.Tables <<-- or
    does not gives any error there are full accesible.

    Any ideas ??????

    Wednesday, September 14, 2005 7:20 AM