Grid edit problem with handle the basic events of JS (click, mousedown, mouseup, mousemove, keydown, keyup, keypress,...)

I want to handle the basic events of JS (click, mousedown, mouseup, mousemove, keydown, keyup, keypress,...) when use edit mode of grid
example: When I keyup in NUM1 column TOTAL will change value => NUM1 + NUM2 = TOTAL
Please refer attack file


Attachment: nfri_1934f880.rar

1 Reply 1 reply marked as answer

VS Vignesh Sivagnanam Syncfusion Team March 26, 2021 12:44 PM UTC

Hi Doan 

Greetings from Syncfusion support 

Based on your query you want to update the value of one columns based on other columns in the keyup or other javascript events. So, we have modified your attached sample to achieve your requirement.  

Please refer the below code example and sample for your reference, 


load(args) { 
    document.getElementById("grid").addEventListener("keydown", function(e) { 
      (document.getElementById("gridTOTAL") as any).value = parseInt((document.getElementById("gridNUM1") as any).value)  
              + parseInt((document.getElementById("gridNUM2") as any).value); 
      }); 
  } 


Regards 
Vignesh Sivagnanam 


Marked as answer
Loader.
Up arrow icon