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

groupHeaderTemplate and data attribute

0 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dr.YSG
Top achievements
Rank 2
Dr.YSG asked on 10 Jul 2012, 07:13 PM
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");
    GridData.grid.select(currentGroupRow.nextUntil(".k-grouping-row"));
}

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dr.YSG
Top achievements
Rank 2
Share this question
or