This is a migrated thread and some comments may be shown as answers.

Q3 2K9 Gridview Group header Show field

1 Answer 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard Grimmer
Top achievements
Rank 1
Richard Grimmer asked on 09 Nov 2009, 12:09 PM
Ot sure if this one will fly, but here goes....

I'm creating a directory type control, in which I'm to display contact information for varous "types" of contact...essentially, I'm using a model like:


    string name
    string data
    enum Type

    string otherField1
    string otherField2
    ....
    ....
    ....
}

I've set up my grid so that it's automatically grouped by Type then Name, and what I need is for 'data' to appear next to the name in the second level header, so that I end up with something akin to:

Type 1 Records (aggregate total)
    Name (Data)
        Full data
    Name (Data)
        Ful Data
    Name (Data)
        Full Data
Type 2 Records
        Name (Data)
        Full data
    Name (Data)
        Ful Data

I'm OK with the total of records of type, and can correctly display the name at the second level, butI can't find a way to add the data part to it. I've tried to use a First function aggregator (since at the second level there will only be a single record), but all I'm able to get is the name of my object, rather than a specific field within it.

The added complication is that I've set up the groupings to occur automatically on initial load, and am hiding the group panel, so it appears that none of the "group" event fire...

Any ideas?

Cheers

1 Answer, 1 is accepted

Sort by
0
Richard Grimmer
Top achievements
Rank 1
answered on 10 Nov 2009, 11:07 AM
RESOLVED: Simply returning a composite field (HeaderText), and grouping based on that rather than the name field
Tags
GridView
Asked by
Richard Grimmer
Top achievements
Rank 1
Answers by
Richard Grimmer
Top achievements
Rank 1
Share this question
or