New to Kendo UI for jQuery? Start a free 30-day trial

SelectItem

methods

Gets or sets the table row which is selected.

Parameters:rowElement|jQuery

A DOM element or a jQuery object which represents the table row.

Returns:jQuery

—The selected table row.

<button id="btn">Highlight the second row</button>
<div id="propertyGrid"></div>

<script>
  $("#propertyGrid").kendoPropertyGrid({
    model: {
        foo: "bar",
        baz: 5
    },
    width: 500
  });

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

    component.selectItem($("#propertyGrid tbody>tr:nth(1)"));
  });
</script>
<button id="btn">Get selected row info</button>
<div id="propertyGrid"></div>

<script>
  $("#propertyGrid").kendoPropertyGrid({
    model: {
        foo: "bar",
        baz: 5
    },
    width: 500
  });

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

    if(row.length > 0){
        var data = component.dataItem(row);
        /* The result can be observed in the DevTools(F12) console of the browser. */
        console.log(data.value);
    }
  });
</script>
Not finding the help you need?
Contact Support