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

[Solved] Remove Grouped column from grid ?

3 Answers 187 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.
kannan
Top achievements
Rank 1
kannan asked on 13 Jan 2011, 01:27 PM
Hi,
How to Remove grouped column from grid.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 13 Jan 2011, 01:30 PM
Hi kannan,

May you provide a bit more details ? How do you want to group - by the UI or from the code ? When do you want to remove that particular column ?
 

Greetings,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
kannan
Top achievements
Rank 1
answered on 13 Jan 2011, 01:36 PM
Hi,

i want to group the column by UI.

 for example, I have three columns in RadGridview like Employee ID,Employee Name and Department. if i grouping the column by Department , it has to remove from grid. i have to display only two columns ( Employee ID,Employee Name).


Thanks
0
Maya
Telerik team
answered on 13 Jan 2011, 03:54 PM
Hello kannan,

You may handle the Grouped event of the grid and set the IsVisible property of the column to false:

void playersGrid_Grouped(object sender, GridViewGroupedEventArgs e)
{
        (e.GroupDescriptor as ColumnGroupDescriptor).Column.IsVisible = false;
}

You may extend the logic above so that it fits your requirements.
 

Best wishes,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
kannan
Top achievements
Rank 1
Answers by
Maya
Telerik team
kannan
Top achievements
Rank 1
Share this question
or