Cobus Kruger
Cobus Kruger

Reputation: 8615

Fully-collapsed hierarchy in Kendo UI Grid

This is the Kendo UI demo showing hierarchical data: http://demos.telerik.com/kendo-ui/grid/hierarchy

It seems to work very well, but the first row is expanded automatically. I tried hacking around with it in their dojo, but couldn't find a way to disable that behavior.

How do I prevent rows from being automatically expanded in Kendo UI Grid?

Upvotes: 1

Views: 434

Answers (1)

Gene R
Gene R

Reputation: 3744

It's because there is used expandRow method in dataBound event to expand first row. Remove it.

var element = $("#grid").kendoGrid({
    ....
    dataBound: function() {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    },
    ....
});

Upvotes: 2

Related Questions