question about dynamic attributes/columns and grouping

Feb 15, 2008 at 11:55 AM
Hello Superlist group,

first of all let me say, that this component is great !

i took over a project, that uses Superlist. we fill the list with objects, that have at least 3 attributes, lets call them A, B and C, we group with - all others are shown as columns.
now we want to have our objects to have more than just one B attribute - some will have one, other maybee three B attributes.
the question is how to handle objects, that can have different attributes - how is it possible to group, even when some of them doesn't have the attribute.
i know this is a listview and we want to have something like a treeview with the group functionality, but maybee someone have an idea how to handle this.

structure i want to show with grouping by attributes :

first col | other cols ...
-A
..-B
....-C
...............| object_1
...............| object_2
-A
..-B
....-B
......-B
........-C
...............| object_3
...............| object_4

any suggestions / ideas if this is possible ?

thx del
Coordinator
Feb 25, 2008 at 6:21 PM
Edited Feb 25, 2008 at 6:24 PM
Hi Del,

A column object will call its GroupItemAccessor property to get the actual group value for a row. The default behavior if it isn't set is to call the standard ColumnItemAccessor for the value. So you could potentially supply your own ColumnItemValueAccessor and set the GroupItemAccessor property with it. With the delegate you could see what type of row object it is and call its appropriate attribute if it doesn't have a common base class or interface.

In the supplied QuickStartCSharp demo you can see the DateColumn's Group accessor overridden to supply group values.

Cheers
Lee