Problems when creating a new subordinate row.



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;
                }
            }
        }

    }




3 Replies

TK TaeWook Kang March 22, 2022 09:28 AM UTC

IMAGE1


IMAGE1.png



TK TaeWook Kang March 22, 2022 09:29 AM UTC

IMAGE2


IMAGE2.png



PS Pon Selva Jeganathan Syncfusion Team March 23, 2022 01:18 PM UTC

Hi TaeWook,   
  
Thanks for contacting syncfusion forum. 
 

Query: Problems when creating a new subordinate row.

 
Based on your query and shared image, we understand you are facing the expand/collapse icon is not shown after the update the record and the script error thrown while adding the row. We checked your query by preparing sample, but we were unable to reproduce the issue at our end. 
 
Please refer to the below sample, 

After following the above reference, still faced issue please share us the following details.

  1. Kindly share the complete tree grid code example
  2. Share the EditSettings details
  3. Share the package version details
  4. Kindly share the complete stacktrace details
  5. If possible, reproduce the issue in the attached sample or share the simple issue reproducible sample.
 
The provided information will be helpful to provide you response as early as possible.   
 
Regards,   
Pon selva   


Loader.
Up arrow icon