In the meantime I tried with VS2005 Beta. I can bind my Control to a
DataGridView (and even use the column editor), but in the DataMember
property the chilkd collections do not show up for the one to many
relations.
Does anybody have any idea? In the meantime I have the impression that the
DataGrid (VS2003) and DataGridView (VS2005) at design time only work with
DataSets, and nothing else.
Regards
Norbert Ruessmann
"Rockford Lhotka" <rocky.spambad@lhotka.net> schrieb im Newsbeitrag
news:efq0XIMeFHA.688@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view] > You don't actually need to implement IComponent. All you should need to do
> is add your class(es) as a data source using the Data Sources window.
>
> Once your classes are available as data sources, you can drag-drop them
> onto a form or otherwise use them like any other data source within the
> IDE.
>
> Rocky
> rocky.spambad@lhotka.net
>
>
> "Norbert Ruessmann" <nr@d1e2v3nr.de> wrote in message
> news:eHkoZDKeFHA.228@TK2MSFTNGP12.phx.gbl...
>> Hello group,
>> I developed some Domain classes , which are NOT a not related to DataSet
>> / DataTable etc. in any way. But they provide similar featurs.
>>
>> A object can for instance contain a collection of Orders, plus a
>> collection of OrderItems. The collection of Orders contains Orders. Each
>> Order has a property OrderItems, which returns a collections of
>> OrderItems. This collection only contains the OrderItems blonging to the
>> corresponding Order (one to many relation)
>>
>> From code data binding works perfectly. I can write:
>>
>> dataGridOrders.DataSource = m_Orders; // instance of Orders Collection
>> dataGridItems.DataSource = m_Orders;
>> dataGridItems.DataMember = "OrderItems"; // name of property of Orders
>> class
>>
>> Thus I can display master/detail relations very easily, just as if I had
>> used a DataSet with two tables and a relation object.
>>
>> Now my Question: I would like to specify DataSource and DataMember in the
>> Properties Windows of the DataGrid in VS designer, just like I can do
>> with a typed DataSet. I made my class implement IComponent, thus I can
>> set the DataSource. But what do I have to implement in my class to be
>> able to specify the DataMember in designer????
>> I searched MSDN and the internet for two days now, but could not find any
>> information on how to do this.
>>
>>
>> Regards
>> Norbert Ruessmann
>>
>
>