M
Michael Gorbach
Iv got a StatisticsContainer object that contains an arraylist of
objects of different types, all inherited from class Statistic. The
statistics class has 2 string public properties, name and stringValue.
The classes that inherit from it use those two properties, plus several
properties of their own of types double and vector. I need to display
this StatisticsContainer class on a datagrid, but I'm having problems
because each of the classes have some different properties. The
datagrid automatically binds to all public properties of the first
entry, but most of these (all but stringValue), are actually unique to
the first entry. What results if i add another entry to the arraylist
is an exception from the reflection namespace. I need to do one of
three things:
1. force the datagrid to display only the properties common to the
statistic base class.
or
2. have the datagrid display little plus marks allowing me to expand
each entry and see all of this unique properties.
or
3. (the best) do both.
The datagrid control is completely confusing me with its myriad
collections of styles. I have no reference books (beyond what i can
find on the web), so I would greatly appreciate some help.
objects of different types, all inherited from class Statistic. The
statistics class has 2 string public properties, name and stringValue.
The classes that inherit from it use those two properties, plus several
properties of their own of types double and vector. I need to display
this StatisticsContainer class on a datagrid, but I'm having problems
because each of the classes have some different properties. The
datagrid automatically binds to all public properties of the first
entry, but most of these (all but stringValue), are actually unique to
the first entry. What results if i add another entry to the arraylist
is an exception from the reflection namespace. I need to do one of
three things:
1. force the datagrid to display only the properties common to the
statistic base class.
or
2. have the datagrid display little plus marks allowing me to expand
each entry and see all of this unique properties.
or
3. (the best) do both.
The datagrid control is completely confusing me with its myriad
collections of styles. I have no reference books (beyond what i can
find on the web), so I would greatly appreciate some help.