Adding new row(Custom Button) to filtered kendo grid

0 Answers 2 Views
Filter Grid
abdul
Top achievements
Rank 2
Iron
Iron
abdul asked on 26 Sep 2025, 10:04 AM

Hi,

I have a kendo grid and in the page load kendo grid automatically have a new empty row. When we click on the + icon then it should create multiple rows in the grid.

 

The above functionality is working fine, but when we do a filter on any of the column then on filter click button it should display filtered row along with new empty row.

After click on filter button the empty row is not creating. I tried the below code on click on filter button it fires the Filter event but  

its not creating the empty row. Can you please let me know how to add a new empty row on click of filter button.

.Events(ev => ev.Filter("onFiltering"))

function onFiltering() {
    var gridName = "grid1";
    var grid = $("#" + gridName).data("kendoGrid");

if (grid && grid.dataSource) {
    grid.dataSource.cancelChanges();
    var newRow = { field: "NewRow", Value: 0 };
    grid.dataSource.add(newRow);
}

}

No answers yet. Maybe you can help?

Tags
Filter Grid
Asked by
abdul
Top achievements
Rank 2
Iron
Iron
Share this question
or