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

Hierarchical grid?

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 12 Apr 2013, 02:09 PM
With the hierarchical grid setup. Can I disable or prevent the child grid on a row by row basis? Or do I need to use brute force and remove the expand/collapse class on the column?

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 12 Apr 2013, 02:49 PM
Hello Greg,


To prevent the detail rows from expanding, according to a specified condition, you could bind to the click event of the expand icon and perform the custom checks.
E.g.
$("#grid tbody").on("click", ".k-hierarchy-cell", function (e) {
    var row = $(this).closest("tr");
    var grid = $("#grid").data("kendoGrid");
    var rowData = grid.dataItem(row);
    if (<custom condition>) {
        e.stopPropagation();
    }
});

 

Greetings,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or