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

[Solved] on removal of one GroupBy column from multiple GroupBy columns

2 Answers 87 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.
Nagavardhana Reddy
Top achievements
Rank 1
Nagavardhana Reddy asked on 04 Aug 2011, 02:35 PM

GridView is exposed with one event named "GridView.Grouped" and this will get fire on adding and removing columns to GroupBy panel. On addtion of column the GridViewGroupedEventArgs  action is telling like "Place" and removal of column action is telling like "Remove".

The piece of code shown below. Here "clubsGrid" is a Grid name. e

 

clubsGrid.Grouped +=

 

new EventHandler<GridViewGroupedEventArgs>(clubsGrid_Grouped);

 


 

 

void clubsGrid_Grouped(object sender, GridViewGroupedEventArgs e)

 

{

 

}

Scenario: We have add two columns to GroupBy panel. on removal first column the event action will be "Remove" and still we have the first column in GroupBy panel.

Requirement: In the above scenario, on removal of one column from GroupBy we should be in a positon to identify that still Groupby contains one more column in Groupby panel.

Kindly help me how to indentify the GroupBy is still available with some more columns or GroupBy is available with specific number of columns using the GridViewGroupedEventArgs in the above mentioned event.

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 04 Aug 2011, 03:50 PM
Hi Nagavardhana Reddy,

At all times, the current grouping information is contained in the RadGridView.GroupDescriptors collection.

You can always read this collection to see what grouping is there.

I hope this helps.

Greetings,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Nagavardhana Reddy
Top achievements
Rank 1
answered on 05 Aug 2011, 09:39 AM
Hi Ross,

Thank you very much for your suggested solution and it's working fine for my requirement.

Thanks & Regards,
Nagavardhana Reddy
Tags
GridView
Asked by
Nagavardhana Reddy
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Nagavardhana Reddy
Top achievements
Rank 1
Share this question
or