How to hide the parent group header in case of multi column groupings in a Kendogrid

5 posts, 0 answers
  1. Feroz
    Feroz avatar
    6 posts
    Member since:
    Jun 2013

    Posted 18 Jun 2013 Link to this post

    Hi,
    If I have grouped my kendogrid by multiple columns, Can I hide the header for the first column and display only the second header? Right now, after grouping by two columns, we have two headers. I can get the details of the first groupby and display in the headertemplate of the second grouping.. So, want to do away with the header created by the first grouping.
    As shown in the screenshot, I want to retain the header encircled in GREEN and do away with the one in red. I would still want the grouping but just don't want the header.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 20 Jun 2013 Link to this post

    Hello Feroz,

    I have already replied to the same questions in you other forum thread, however I am pasting my reply here too so the other users who are interested in the same can read it: 

    Generally speaking you could achieve this using the suggested approach in my previous replies, however you should use custom logic to find the
     correct grouping rows. As a possible approach I can suggest the following:

    • Find the first group field (using dataSource' group() method):       
      //get reference to the Grid's widget
      var grid = $("#grid").data("kendoGrid");
      //get the first group field
      var firstGroup = grid.dataSource.group()[0].field;
    • Get the first group field's title from the grid.options.columns array;
    • Check if the grouping row contains the particular title and if yes remove this row. As an example: 
      $('#grid tbody .k-grouping-row:contains("City")').hide();  //City is the first group column's title

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Will
    Will avatar
    34 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2015 in reply to Iliana Nikolova Link to this post

    How about a link to the other thread?
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2594 posts

    Posted 16 Nov 2015 Link to this post

    Hi Will,

    Here is a direct link to the other thread, however you could read my answer in the current thread too.

    Regards,
    Iliana Nikolova
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Will
    Will avatar
    34 posts
    Member since:
    Oct 2013

    Posted 16 Nov 2015 in reply to Iliana Nikolova Link to this post

    Thanks Iliana.  Sometimes it is helpful to see the full discussion.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready