Component One Silverlight FlexGrid Tip – 1 (Collapse to group level)

If you have a grid which have bunch of groups, You might want to collapse the grid to root level at the start of the program or expand all the groups.  You can achieve this by using the FlexGrid method call ‘CollapseGroupsToLevel(int groupLevel)’.

Whenever you need to work on collapsing to a specific level from external trigger, I would recommend to identify the collection depth before hand so that you know what is deepest groups you have. So if you requirement to show the grid collapsed on start up, then you call

grid.CollapseGroupsToLevel(0)

image

By default, if you do not collapse to a specific level then grid by default will expand to all groups.

If you want to expand the group to say a specific level then you can do it in the XAML code behind as

grid.CollapseGroupsToLevel(expandLevel); //where expandLevel is set to which ever group level user want to expand to.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s