We have just upgraded from version 10 to 14. In the process, we discovered that although the grid's crud service still returns true if the end cell editing event is cancelled, this return value is not passed back in the grid's endEdit method.
Knowing whether or not end cell editing has been cancelled is a critical part of our application's functionality. We absolutely cannot let the user proceed with other operations (navigating away from the page, printing the records, etc) if the cell is still in edit mode and the user's changes have not been persisted.
Please restore the return value for endEdit as soon as possible
Hello,
I have been looking into your question, however, I'm not sure I understood your requirement completely.
I have tested the behavior of the grid when the cellEdit event is canceled and the page is changed in both version 10 and 14. The observed behavior in version 10 is that the edited cell remains in the view, however, the rest of the fields are not from this row.
In version 14 when the page is changed the cell exits edit mode and the changes are not committed. However, preventing certain interactions could be achieved on application level. Since the event is canceled on some conditions through the code, an approach I could suggest is to store the event.cancel value in a global variable and then you could prevent the required actions depending on this value.
For example, I have prepared a sample where paging is prevented when the cellEdit event is canceled via the paging event and it could be found here.
Using a similar approach you could prevent other actions based on the same global variable.
Please test the sample above on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.
Looking forward to hearing from you.
Regards,Teodosia HristodorovaSoftware Developer
Sorry, it appears that the problem has been misunderstood.
This is not about what happens in the grid UI, it is about what happens when I programatically ask the grid to end editing using grid.endEdit() method.
In previous releases, this method would return true if the endCellEditing event was cancelled. This event can be cancelled for any number of reasons including validation failure.
We must ask the grid to end editing in numerous circumstances such as when a user wants to print a report. If the end edit request is cancelled and just prints the report without saving the value of the cell they are currently editing, then the information in the report will not match what the user is seeing on the screen which could potentially result in a significant financial error for the customer.
What we are asking for is the restoration of the return value to grid.endEdit in the event the endCellEditing event is cancelled.
I have modified the previously provided sample in order to demonstrate how you could end the editing when the page is changed and commit or not the changes based on whether the cellEdit event is canceled.
In order to achieve this behavior I'm storing the event cancel argument in a global variable.
Using a similar approach you could end the cell editing on other interactions.
Here could be found my sample for your reference. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce.
Sincerely,Teodosia HristodorovaSoftware Developer
I seriously do not understand what the purpose of resistance is here. The crudService already returns false, it is a 2 line code change to have the grid method return the same value.
The workaround method provided is incomplete and inaccurate (how does the value get reset?).
I am extremely disappointed with the level of support we are receiving. We have been dedicated Infragistics customers for 20 years now and this responsiveness is making us rethink our commitment to Infragistics.
After discussing this with our development team, I have logged the behavior in our GitHub repository here. Any concerns or questions that you have can be directly addressed in the issue, which will give you the opportunity to directly communicate with the development team.In order to receive a notification whenever new information is available please make sure that you are subscribed to the issue. This can be achieved via the “Subscribe” button.
In addition, I could say that currently, we are working on the issue in order to have fix as soon as possible. However, please note that the supported versions of igniteui-angular at this point are 15.1 and 16.0. If updating to any of these versions is not an option for you, we could provide a patch for version 14.2, however, please keep in mind that this would be outside of the standard procedure and could be considered as an exception.
Please let me know if you need any further assistance regarding this matter.
Thank you for this! We have just completed our upgrade to version 16, so we will not need a patch for v14, but thank you for offering that as an option.
This behavior has been fixed and is available in our latest version - 16.0.23.
Please test it on your side and let me know if you need any further information regarding this matter.
Regards, Monika Kirkova, Infragistics