I added a lower row of the "CAV" row as shown in image 1 below.
This gave us a shape that represents the submatrix of the next row, "VRF-OUTDOOR".
But this shape disappears on update.
There is also another problem with these issues.
If a child row of the matrix located at the bottom is added, the same error as in image 2 occurs.
I think this problem stems from the first problem.
function treeBeforeBatchAdd(args) {
var DataGrid = document.getElementById("EqSelTree").ej2_instances[0];
var rowSel = DataGrid.getSelectedRecords();
EqName = (rowSel.length > 0) ? rowSel[0]["EQ_NM"] : "";
var P_EQ_NO = (rowSel.length > 0) ? rowSel[0].P_EQ_NO : null;
if (BldgNo == "" || P_EQ_NO != null) {
args.cancel = true;
}
else {
let arrEqName = ['AHU-CW', 'AHU-DX', 'ACWC', 'ACCU', 'PACU', 'CFU', 'SIF', 'CWP', 'CCU-DX', 'CCU-CW', 'SAC', 'BPV', 'MFD'];
let arrEqName2 = ['VRF-OUTDOOR', 'SF', 'EF', 'EDH', 'HU', 'VAV', 'CAV', 'FCU-OUTDOOR'];
var find = arrEqName.find(x => x == EqName);
if (find != null) {
args.cancel = true;
}
else {
find = arrEqName2.find(x => x == EqName);
if (find != null) {
args.defaultData["EQ_NM"] = EqName + "-SERVICE ZONE";
previousEqName = EqName;
}
}
}
}
IMAGE1
IMAGE2