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

2 posts, 0 answers
  1. W
    W avatar
    17 posts
    Member since:
    Aug 2014

    Posted 11 Aug 2016 Link to this post

    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?

  2. Stefan Nenchev
    Stefan Nenchev avatar
    665 posts

    Posted 15 Aug 2016 Link to this post


    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.

    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.
Back to Top