Skip to content

Igx-grid save default value on selecting other cells #12248

Answered by ddaribo
kevalgw asked this question in Q&A
Discussion options

You must be logged in to vote

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 the event.newValue properties.
The cell could be retrieved with the h…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kacheshmarova
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants