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

gridview add group by column and hiding the automatically added column header

1 Answer 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
W
Top achievements
Rank 1
W asked on 11 Aug 2016, 01:15 PM

when I use the group by (move a column to the group by header)

there is a empty column added.

How can I hide these?

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 15 Aug 2016, 10:09 AM
Hello,

The element which you need to hide is of type IndentPresenter. You can attach to the Grouping event of RadGridView and hide its visibility in the following manner:
private void clubsGrid_Grouping(object sender, GridViewGroupingEventArgs e)
      {
          var element = this.clubsGrid.ChildrenOfType<IndentPresenter>().Where(c => c.Name == "PART_IndentPresenter").FirstOrDefault();
          element.Visibility = System.Windows.Visibility.Collapsed;
      }

Please give it a try and update me whether it has worked for you.

Regards,
Stefan Nenchev
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
W
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or