|
data() {
return {
parentData:
employeeData,
childGrid: {
dataSource:
data,
queryString:
'EmployeeID',
load:
load(),
columns: [
{ field:
'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 120 },
{ field:
'CustomerID', headerText: 'Customer ID', width: 150 },
{ field:
'ShipCity', headerText: 'Ship City', width: 150 },
{ field:
'ShipName', headerText: 'Ship Name', width: 150 }
],
load:
function (){
this.element.addEventListener('mousedown',
function (e) {
if
(e.target.parentElement.classList.contains('orderTemplate')) {
var instance = this.ej2_instances[0];
if (instance.isEdit)
instance.endEdit();
var index =
parseInt(e.target.closest('.e-rowcell').getAttribute('index'));
instance.selectRow(index);
instance.startEdit();
}
});
}
}
},
|