none
Adding a project data source RRS feed

  • Question

  • I am trying to use a DataGridView in a windows forms application. I did have it working properly displaying the contents of a list. Unfortunately recently the form editor stopped working (it produced errors saying that it could not find the class that the BindingSource was linked to whenever I tried to view the main form in my application) and I found that the only way in which I could get it to start working again was to completely delete the data source, the collection class and the DataBindingSource.

    Now I am trying to put things back to how they were and I am having problems. I have created a new class defined as follows:

    #pragma once

    using namespace System::Collections::Generic;

    #include "RSSItem.h"

    namespace RSS0{

    ref class RSSItemCollection : public List<RSS0::RSSItem^>

    {

    public:

    RSSItemCollection(void) { }

    };

    }

    The problem I have is that now I can't link this to the DataGridView in the form editor. The data source select has no data sources in it so I clicked on the "Add Project Data Source" link. In the dialog I then selected "object" and then clicked on the "next" button. The screen then asks me to select the object I wish to bind to but the list is completely blank. What do I need to do to get my class above to appear in this list. I have done this once before so I know it is possible but I can't seem to see what I'm doing wrong.

    I am using Visual C++ 2005 Express Edition.

    Can anyone help?

     

    Thanks in advance

    Mog0

    Thursday, December 15, 2005 12:53 AM