Igniteui-angular: Why am i not able to save edited value in grid on clicking anywhere in the grid

Created on 1 Feb 2020  路  4Comments  路  Source: IgniteUI/igniteui-angular

Question

So when i edit the grid, using inline editable cells functionality.

Values are not saved when i click anywhere else in the grid, either i have to click on other cell , hide enter or f2 as provided in the document.

But i feel once edited the cell and clicked anywhere in the grid, the value should be saved in the grid instead of keeping the cell still editable and not relflecting the value in the grid.data.

Its a bottleneck and i think this is very much needed as the interaction otherwise with the grid in edit mode is a little annoying.

Its more annoying when the gird has less row and more empty space, so user doesnot have many cells to click in to save their value.

Or if there is any alternative way to handle this , please do let me know.

  • igniteui-angular version:
  • browser:
question

Most helpful comment

Perfect thanks, will check this solution. It satisfies my requirement completely.

All 4 comments

Hello @amitmoondra ,
As you have read in our documentation, when you perform a certain interactions the grid submit the cell in edit mode and in other scenarios the cell exit edit mode without submitting the value or remain in edit mode.
If you need to change this behavior the grid provides quite rich API, which will allow you to do that easily. The grid expose the following events related to the cell editing:
onCellEditEnter; onCellEdit; onCellEditCancel;
Also you can use the method endEdit(), which by default will submit the cell in edit mode;
If you need any additional information or need further support, we will be happy to help.

No none of this works, i have already tried every possible ways using the ric API, but it doesnot work.
Cannot save a cell value if in edit mode and clicked outside of any row or even somewhere in the grid.
Provide me a sample if you can for the above implementation, so i would know what i am doing wrong or if there is a new approach to handle it

Hello @amitmoondra ,
I managed to build a small example for you where you can see how to submit the cell in edit mode if the user click somewhere in the application. Please take a look at the provided example and see if this fulfill you use case. Similarly you can apply this logic and for other scenarios.
If you need further assistance, please contact us.

Perfect thanks, will check this solution. It satisfies my requirement completely.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brianlagunas picture brianlagunas  路  3Comments

furugen picture furugen  路  3Comments

jdk339 picture jdk339  路  3Comments

Hypenate picture Hypenate  路  3Comments

mkamiishi picture mkamiishi  路  3Comments