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

Grouping issue

4 Answers 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Spoook
Top achievements
Rank 2
Spoook asked on 24 Jul 2008, 10:54 AM
Hi,

First issue:
I have a RadGridView with three columns and this data:
            radGridView1.Rows.Add("a", "b1", "c");
            radGridView1.Rows.Add("a", "b2", "c");
            radGridView1.Rows.Add("a", "b3", "c");
            radGridView1.Rows.Add("a", "b1", "c1");
            radGridView1.Rows.Add("a", "b2", "c1");
            radGridView1.Rows.Add("a", "b3", "c");
            radGridView1.Rows.Add("a2", "b1", "c1");
            radGridView1.Rows.Add("a2", "b2", "c");
            radGridView1.Rows.Add("a2", "b3", "c");
            radGridView1.Rows.Add("a3", "b1", "c");
            radGridView1.Rows.Add("a3", "b2", "c1");
Very simple. If I set ShowGroupPanel property to false and group for example by the first colum, is there any possibility to ungroup?

Second issue:
When I group by the first column for the example above, with ShowGroupPanel set to true, I can sort asc/ descending from the GroupPanel on the given column. All good. But if I for example collapse all the groups(nodes) except the first, in normal ascendin order there are 6 entries and the first group (node) named "a". But if at this point I choose descending order to the first column (that I grouped by) then the expended node will be "a3" with 2 entries it has.
I belive in most cases this is not what a user has in mind. If you collapse a group(node) you expect it to stay collepsed until expanded. Is there any simple way to make this happen? or this is a bug kinda' thing?

Thank you.

4 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 25 Jul 2008, 09:47 AM
Hi Spoook,

First issue:
You can clear grouping using group expression API:

this.radGridView1.MasterGridViewTemplate.GroupByExpressions.Clear(); 

Regarding the second issue, this is a problem in our caching and state management used for DataGroups objects. The problem will be fixed for Q2 SP1 release.

Thank you for the reported issue. Your Telerik points have been updated.

Regards,
Julian Benkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Spoook
Top achievements
Rank 2
answered on 28 Jul 2008, 08:50 AM
Hi,

Thank you for your response.

First issue: I was not clear enough. My bad. I wanted to know if there is any possibility to ungroup from the form, not from code.

Second issue: when do you think the SP1 will be released?

Thank you
0
Accepted
Nikolay
Telerik team
answered on 30 Jul 2008, 01:01 PM
Hi Spoook,

Grouping/Ungrouping functionality of RadGridView's UI is only possible if ShowGroupPanel is true. If you want to ungroup from the UI, but with ShowGroupPanel set to false, you cannot directly do it from RadGridView. You can ungroup for example on a RadButton click by setting the necessary code in the Click event handler:
private void radButton1_Click(object sender, EventArgs e)  
{  
    this.radGridView1.MasterGridViewTemplate.GroupByExpressions.Clear();   

If you have additional questions, feel free to contact me.

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Spoook
Top achievements
Rank 2
answered on 30 Jul 2008, 01:38 PM
Hi,

Thank you. I was aware that you can get around the problem, but wanted to know if there is a direct way on the form to ungroup. For me it seemed normal that if you can group while the ShowGroupPanel set to false, then you can ungroup as well.

Thank you, no other questions here


Tags
GridView
Asked by
Spoook
Top achievements
Rank 2
Answers by
Julian Benkov
Telerik team
Spoook
Top achievements
Rank 2
Nikolay
Telerik team
Share this question
or