Thanks to visit codestin.com
Credit goes to www.telerik.com

removeRow

Removes the specified table row from the TreeList. Also removes the corresponding data item from the data source. Fires the remove event.

Parameters

row String|Element|jQuery

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

Example - removing the first table row

<button id="btn">Remove second row</button>
<div id="treelist"></div>
<script>
  var dataSource = new kendo.data.TreeListDataSource({
    transport: {
      read: {
        url: "https://demos.telerik.com/service/v2/core/EmployeeDirectory/All"
      },
      destroy: {
        url: "https://demos.telerik.com/service/v2/core/EmployeeDirectory/Destroy",
        type: "POST",
        contentType: "application/json"
      },
      parameterMap: function(options, operation) {
        if (operation !== "read" && options.models) {
            return kendo.stringify(options.models);
        }
      }
    },
    batch: true,
    schema: {
      model: {
        id: "EmployeeId",
        parentId: "ReportsTo",
        fields: {
          EmployeeId: { type: "number", editable: false, nullable: false },
          ReportsTo: { nullable: true, type: "number" },
          HireDate: {type: "date"},
          BirthDate: {type: "date"}
        },
        expanded: true
      }
    }
  });

  $("#treelist").kendoTreeList({
    dataSource: dataSource,
    toolbar: [ "create" ],
    editable: "popup",
    height: 540,
    columns: [
      { field: "FirstName", expandable: true, title: "First Name", width: 250 },
      { field: "LastName", title: "Last Name" },
      { field: "Position" }
    ]
  });
  $("#btn").click(function(){
    var treelist = $("#treelist").data("kendoTreeList");
    treelist.removeRow($("#treelist tbody>tr:nth(1)"));
  });
</script>
In this article
removeRow
Not finding the help you need?
Contact Support