toggleGroup

Toggles the expanded or collapsed state of a group.

Parameters

row String|Element|jQuery

A string, a DOM element, or a jQuery object which represents a grouping row. A string is treated as a jQuery selector.

Example - toggle the expanded/collapsed state of an item

<button id="btn">Toggle expanded/collapsed state of the first group</button>
<div id="propertyGrid"></div>

<script>
  $("#propertyGrid").kendoPropertyGrid({
    model: {
        foo: "bar",
        baz: 5
    },
    items:[
      { field: "foo", group: "Group A" }
    ],
    width: 500
  });

  $("#btn").click(function(){
    var component = $("#propertyGrid").data("kendoPropertyGrid");

    component.toggleGroup($("#propertyGrid .k-table-group-row.k-grouping-row:nth-child(1)"));
  });
</script>
In this article