Xtreme Report: how to collapse/Expand all |
Post Reply |
Author | ||
Davide
Newbie Joined: 21 January 2006 Location: Italy Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 21 January 2006 at 11:54am |
|
Hi All,
I am trying to collapse/Expand all group when a grouping view is activated. I am trying to do it so If AxReport.ShowGroupBox Then For Each report_row In AxReport.Rows If report_row.GroupRow Then report_row.Expanded = False End If Next report_row End If but it does not work. Better, it works only the first time I collapse all the grouped rows. Thanks Davide |
||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
|
Hi Davide,
When you set Expanded property to False, you force rows to be collapsed. Following piece of code reverts Expanded state:
-- WBR, Serge |
||
Davide
Newbie Joined: 21 January 2006 Location: Italy Status: Offline Points: 2 |
Post Options
Thanks(0)
|
|
Hi seerge, the code lines in my post are those I use to collapse my groups rows. Naturally, the ones I use to expand my rows are the same you have posted. The problem is that this does not work. What I do: 1) Read a recordset from a database 2) Add records to the report 3) Call the populate method ( so the rows are generated) 4) Activate the group box view 5) Drag'n'Drop a Column Header in the group box All the rows are now grouped and expanded 6) Press a button that fires up the Collapse code (the code in my post) It works.... 7) Press a button that fires up the Expand code (the same sserge posted) It doesn't work.... If I click a column header to sort rows by that column all the group returns expanded, but my button doesn't work anymore. Executing code line by line I have seen that the execution skip to 'End If' (with reference to the code previously posted) exactly as the report was zero rows populated. Some Hint? Davide |
||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
|
Davide,
If you have different buttons for expand / collapse then just try to set Expanded to True.
-- WBR, Serge |
||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|
Have you looked at our samples? I.e. in the Report sample if you right-click on a group row you have the option to expand\collapse all rows.
This code works fine in our sample. If you want to keep grouping, you will have to remember the expand\collapse state then after a sort using the SortOrderChanged event you must restore the expand state.
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |