ReportControl expands groups on populate |
Post Reply |
Author | |
AndersH
Newbie Joined: 21 January 2005 Location: Norway Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 21 January 2005 at 4:41am |
We have develepoed a report control based task list which is automatically refreshed at regular intervals. If the user has applied custom grouping and collapsed some of the groups all the groups are expanded the next time populate is called. The behaviour can very easily be seen in the ReportControl sample: group by something and collapse a few groups. Double-click a bold line to set its state to read - all groups are expanded. Does anyone have any idea on how to avoid this? |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Please note that after repopulating the control, all rows, including group rows, have renewed to another objects. That's why all theirs properties, including collapsed state are lost. However, of course the solution exists. For example, you can override Populate() method for your control, or just add "before" and "after" Populate blocks of code, where you'll save Rows state before Populating, and restore it after. For example on how it could be accomplished see below:
-- WBR, Serge |
|
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 |