We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cell in edit mode and focusout.

Thread ID:

Created:

Updated:

Platform:

Replies:

148555 Oct 24,2019 03:08 PM UTC Oct 25,2019 12:22 PM UTC React - EJ 2 1
loading
Tags: Grid
Giorgio
Asked On October 24, 2019 03:08 PM UTC

Hello again,
i tried to work with cell content in editMode but without success.

We have this new requirement:
When you are in edit mode and enconter a kind of coulmn (in this case Cod.C / we use an array to mark special column) you should:
  1. Get the content of the column/ cell that it is going to be edited. (i.e. Cod.Col column and cell value 5)
  2.  Apply a function to resolve a value from that content. (i.e.let result = ()=>resolve(5))
  3. The result of that function, i should using setCellValue and change the column +1 putting as value the result of the function. (ie. setCell(Cod.Col+1, result)
  4. The grid has a primary key to make setCellValue work.
In the picture above i would like to apply a function to the value resolve(5) and from that value i would like to the cell Nomb..still remaining in edit mode.
My problem is how to detect which cell is editing the user, retrieve the columName to look in the array and how to set the columnName+1.
Best Regards,
Giorgio












Balaji Sekar [Syncfusion]
Replied On October 25, 2019 12:22 PM UTC

Hi Giorgio, 

Thanks for contacting syncfusion support, 

We have validated your query and we are created a sample with bind the keypress event on specific input element(CustomerName) and we are able change another column(Freight) value in the edit mode using actionComplete event in requestType as beginEdit. Please refer the below code example and sample for more information. 

[index.js] 
actionComplete (args) { 
        if (args.requestType == "beginEdit") { 
           var inputEle = args.form.querySelector("tbody").querySelector("input[name=CustomerName]"); 
//Bind the keypress event in the CustomerName input element while editing the Grid 
            inputEle.addEventListener("keypress", function (args) { 
                var tbody = args.target.closest("tbody"); 
                tbody.querySelector("input[name=Freight]").value = 12000000; // We have update a value in Freight column value  
            }); 
       
    }; 


Please get back to us, if you need further assistance. 

Regards, 
Balaji Sekar. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon