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

Implementing batch editing with popup window

2 Answers 228 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mantas
Top achievements
Rank 1
Mantas asked on 30 Sep 2016, 02:41 PM

I've downloaded this project, because I would like to implement batch edit with popup window edit. And instead of mvc wrapper I used javascript for grid code. 

The mvc wrapper code and javascript code are equivalent. However, it seems that 'e.stopImmediatePropagation();' does not allow for grid 'change' event to occur. Yet it perfectly works when code is written in wrapper.

What I am missing? Or it is expected behaviour?

 

http://www.telerik.com/support/code-library/external-editing-container-for-batch-editable-grid

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Oct 2016, 08:09 AM
Hello Mantas,

I can assume that the difference occurs because the event handlers are attached in a different order.

I can suggest using e.stopImmediatePropagation() on the Grid table element instead of its tbody element:

$('#ContactGrid').data().kendoGrid.table.click(function (e) {
 e.stopImmediatePropagation();
});

Also, as the example is using a version of Kendo UI from 2012, some of the approaches are changed. For example, the selected dataItem can be taken using the dataItem method of the Grid:

var grid = $("#ContactGrid").data("kendoGrid");
var dataItem = grid.dataItem(grid.select());

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-dataItem

I hope this is helpful.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Mantas
Top achievements
Rank 1
answered on 04 Oct 2016, 08:59 AM

Thank you for the reply, however this does not make any significant change.

Function 'onSelect(e)' on grid change event is not being called even though I comment out 'e.stopImmediatePropagation();' line.

The thing was missing was that I had to set 'editable' property of the grid to true.

 

Tags
Grid
Asked by
Mantas
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mantas
Top achievements
Rank 1
Share this question
or