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

Adding New Group at the beginning of Collection

1 Answer 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 28 Nov 2011, 04:34 PM
Hey All,


I`ve got a report with predefined groupings, however, I now have to add a new group programmatically. I've figured out how to do it, except that I want to add it at the beginning of the Grouping collection, and when i try Report.Groups.Add(newGroup), it adds it at the end...


Right now i have two levels of grouping.

I want to add a third, but i need this new one to be the topmost grouping level.

How can I do this, if at all possible?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 29 Nov 2011, 05:32 PM
Hi Erik,

This method inserts the group at the specified index.
report.Groups.Insert(int index, Group item);

report.Groups is a collection and you can treat like any other (adding, removing, swapping...)

Kind regards,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Erik
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or