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

[Solved] How to expand/collapse all groups

5 Answers 321 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.
Jani
Top achievements
Rank 1
Jani asked on 06 Nov 2009, 10:36 AM
How can I expand/collapse all RadGridView groups?

ExpandAllGroups() expands only the first group!?

Using this sequence, expands only the visible groups:
foreach ( object item in radGridView.Items ) 
    GridViewGroupRow groupRow = radGridView.ItemContainerGenerator.ContainerFromItem( item ) as GridViewGroupRow; 
    if ( groupRow != null ) 
    { 
        groupRow.IsExpanded = true
    } 

Using both in combination
foreach ( object item in radGridView.Items ) 
    GridViewGroupRow groupRow = GridView.ItemContainerGenerator.ContainerFromItem( item ) as GridViewGroupRow; 
    if ( groupRow != null ) 
    { 
        groupRow.IsExpanded = true
    } 
GridView.ExpandAllGroups(); 
does the job but after scrolling and opening/closing some groups manually, I have a NullReferenceException in Telerik.Windows.Controls.GridView.GrtidVIewVIrtualizingPanel.GetIsCached.

Any suggestions?

Cheers,
Jani


5 Answers, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 06 Nov 2009, 03:55 PM
Hi Jani,
This is a known issue. Later today  a fix will be available.
Please download the latest internal build. It will be available for download  in your Client.NET account  in a few hours

Please excuse us for the inconvenience caused.

Kind regards,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sébastien ISINGRINI
Top achievements
Rank 1
answered on 02 Dec 2009, 04:33 PM
Hi,
I use a trial for the moment and I do not have access to this last internal build.

Latest Internal Builds (Trial)

Rss Feed
No internal builds for RadControls for Silverlight 2009.3 1103 Trial have been uploaded recently.

If you do not see any downloads for latest internal builds you need to download a current official release first. Please visit Free Trials or Downloads (if you have a purchase)


Do you have the corrective to see the result for expanding/collapsing bug ?

Thanks,

Seb

0
Hristo
Telerik team
answered on 03 Dec 2009, 08:26 AM
Hello Sébastien,

According to your account info you have not downloaded any version of RadControls for Silverlight. Maybe you obtained your trial copy through some other account. In order to see the latest internal builds you have to download the latest official version of RadControls for Silverlight (Trial or Dev version) using this account. Once this is accomplished you should see the latest internal build version 2009.3.1127.

I believe the fix for the mentioned bug is already included in this latest internal build.

Please let me know if I can be of further assistance

Sincerely yours,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sébastien ISINGRINI
Top achievements
Rank 1
answered on 03 Dec 2009, 09:22 AM
Thank you Hristo,
You're right. I could download now. I tested the CollapseAllGroups() and ExpandAllGroups() methods.

It seems to work better but there is yet bugs when collapsing/expanding a few times.

I have a System.IndexOutOfRangeException into the method (stack) :
. Telerik.Controls.GridView.IndexTree.CumlativeValue(Int32 endIndex)
. Telerik.Controls.GridView.GridViewVirtualizingPanel.ExtendDesiredSize(Int32 itemsCount, Size stackDesiredSize, Int32 pivotIndex, Boolean before)
. Telerik.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
. ...

Do you have any suggestion/issue ?

Seb
0
Vlad
Telerik team
answered on 03 Dec 2009, 04:28 PM
Hello Seb,

Can you send us an example (via support ticket) where we can reproduce and debug this?

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Jani
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Sébastien ISINGRINI
Top achievements
Rank 1
Hristo
Telerik team
Vlad
Telerik team
Share this question
or