This is a migrated thread and some comments may be shown as answers.

Kendo Grid - Hide newly added row while editing in Popup

2 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anthar
Top achievements
Rank 1
Anthar asked on 02 Nov 2016, 04:41 AM

I am using Kendo grid with editable popup and I want to hide/not use the row which is showing editing changes on runtime. 

Reason:  

I have a kendo multiselect control in popup and on saving data it adds multiple rows in db and it should show in grid as well. That's why I don't want to show that editing changes line. 

 

2 Answers, 1 is accepted

Sort by
0
Anthar
Top achievements
Rank 1
answered on 03 Nov 2016, 09:32 AM

Solution
I was looking for a property of Kendo Grid to not show the editing row but didn't found so I removed the first row in edit function of Kendo Grid

 

$("#MyKendoGrid").kendoGrid({
    dataSource: myDataSource,
    //
    // other properties
    //
    edit: function (e) {
        $("#MyKendoGrid .k-grid-content table tr:first").remove();
    }
});
0
Stefan
Telerik team
answered on 04 Nov 2016, 06:59 AM
Hello ,

After inspecting the provided solution, I can suggest instead of removing the row to hide it, as removing it can create different issues later on with some of the Grid' features:

edit: function (e) {
 $("#grid .k-grid-content table tr:first").hide();
}

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
Tags
Grid
Asked by
Anthar
Top achievements
Rank 1
Answers by
Anthar
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or