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

The value is not getting binded when NumericTextBox control is used as a cell editor in Ag-Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

150379 Jan 4,2020 07:15 AM UTC Jan 13,2020 06:26 AM UTC Angular - EJ 2 3
loading
Tags: NumericTextBox
Tuariq
Asked On January 4, 2020 07:15 AM UTC

Hi Team,


Version Info:- @syncfusion/ej2-angular-inputs": "^17.4.39"

When NumericTextBox is being used as a custom cell-editor in ag-grid, its value is not getting binded when any change is made in control from keyboard and other cell is clicked.
However change do get binded if increment/decrement icons of control is used.
I have attached a sample project. In project, the first column by headername "Make" is using numeric editor. Type a number and click on any other cell.

Thanks
Tuariq

Attachment: Numeric_e1a1b62e.zip

Berly Christopher [Syncfusion]
Replied On January 7, 2020 05:18 PM UTC

Hi Tuariq, 
 
Greetings from Syncfusion support.  
 
We would like to inform you that, while focus out the AG-Grid cell, then getValue method will be fired. In this method, we can return the component element value to maintain the selected value from the component. Please check the attached sample in the below link. 
 
 
Regards, 
Berly B.C 


Tuariq
Replied On January 10, 2020 09:25 AM UTC

Hi Berly,

Thank you for the help. This had solved my issue.
I just had a query why we cannot just return the bounded property in getValue().

The control is binded [(value)]="selectedVal" and we can simply return this selectedVal in getValue().
Why we have to use this line: return (document.getElementById("numeric") as any).ej2_instances[0].element.value;

Is this a workaround for some bug?


Thanks
Tuariq

Sureshkumar P [Syncfusion]
Replied On January 13, 2020 06:26 AM UTC

Hi Tuariq, 
 
We have validated your query, in the AG-Grid component getValue method trigger before our component change event triggers. That is the reason the binded value property does not get updated while getting the value inside the getValue method. So, we suggest you use the below workaround solution to get rid of your issue. 
 
Regards, 
Sureshkumar P 


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