groupHeaderTemplate and data attribute

1 posts, 0 answers
  1. Dr.YSG
    Dr.YSG avatar
    210 posts
    Member since:
    Dec 2009

    Posted 10 Jul 2012 Link to this post

    I just wanted to share an elegant solution I found for passing the group value to a button that handles picking the entire group:

    "Group: #= value #, Count: #= count # <div data-val='#= value #' class='button black' onclick='GridPickGroup(this)'>Select Group</div>";

    function GridPickGroup(button) {
        var value = $(button).data("val");
        var currentGroupRow = $(button).closest(".k-grouping-row");".k-grouping-row"));
Back to Top