UpdateCell Error

The updateCell operation will not work on the first 'cellSave' operation after accessing the page.

From the second 'cellSave', it works well


//script

function cellSave(args){
let EQrowData = args.rowData;
let EQcellValue = args.Value;
var rowIndex = this.getRowinfo(args.cell.closest('tr')).rowIndex;
var i = 0;

switch (args.columnName) {
case "S_AIR_FLRT":
                if (EQcellValue == null) EQcellValue = 0; //입력된 Data가 없을 경우
                    let calValue = EQrowData["DTY_QTY"];
if (calValue != null || calValue != ""){
                    let result = (Math.ceil(EQcellValue / calValue * 10)) / 10;
                    this.updateCell(rowIndex, "U_AIR_FLRT", result);
}
                break;
}
}

3 Replies

SI Santhosh Iruthayaraj Syncfusion Team July 10, 2023 02:20 PM UTC

Hi TaeWook Kang,


Greetings from Syncfusion support.


The "cellSave" event is triggered when the save action occurs. As a result, the "updateCell" method is also triggered before the editor is closed. So, the "updateCell" did not function as intended. To address this problem, we recommend utilizing the "cellSaved" event of the Grid instead of the "cellSave" event. The "cellSaved" event is triggered after the cell has been saved.


cellSaved API: https://ej2.syncfusion.com/documentation/api/grid/#cellsaved


Regards,

Santhosh I



TK TaeWook Kang July 11, 2023 12:25 AM UTC

I changed it to "cellSaved" and the same thing still happens.



SI Santhosh Iruthayaraj Syncfusion Team July 11, 2023 02:09 PM UTC

Hi TaeWook Kang,


We have tried reproducing the problem you mentioned from our side. But the attempt was unsuccessful. The updateCell method works as expected for first cellSave as well. You can find the video demonstration and sample attached below. So to proceed further with this can you please provide us with the follow information.


  1. Could you please explain your requirement and the problem you are facing clearly with screenshots or video demonstration?
  2. Please share us the Grid package version you are using.
  3. If any error occurs. Please share us a screenshot of the error.
  4. Please provide us the entire Grid code with sample of the dataSource you are using. Because the code you provided will work based on the dataSource.
  5. Also, if possible, please reproduce the issue in the provided sample or share us an issue reproducible sample. This will help us provide you with a solution as quickly as possible.


Regards,

Santhosh I


Attachment: Sample_and_Demo_e7b24e60.zip

Loader.
Up arrow icon