-
Hi, In my grid I want to save default value when user edit a particular cell and try to save null value Angular.Demos.-.Google.Chrome.2022-10-31.11-10-44.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @kevalgw, While there is no built-in property in the grid for a cell editing default value, your requirement could easily be achieved with the methods exposed by the IgxGridComponent API. The cellEdit event of the grid could be handled in order to check whether the new value of the cell, which could be accessed from the event arguments’ |
Beta Was this translation helpful? Give feedback.
Hello @kevalgw,
While there is no built-in property in the grid for a cell editing default value, your requirement could easily be achieved with the methods exposed by the IgxGridComponent API.
The cellEdit event of the grid could be handled in order to check whether the new value of the cell, which could be accessed from the event arguments’
newValue
property, is equal to a null value for the corresponding data type. For example, for a ‘string’ that would be‘’
, for a number –0
, for a Date –null
, etc.Then, the specific default value for the particular column has to be set to the currently edited cell’s
editValue
and theevent.newValue
properties.The cell could be retrieved with the h…