Hi,
We are trying to use igHierarchicalGrid and edit rows (editMode = "row").
Is there a way to exit edit mode as soon as user click outside of the grid ?
Regards.
Alain.
Hello Cosoluce_Stones,
Thank you for posting in the Infragistics forums!
We received your support request concerning exiting Edit Mode in the igGrid, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review and I will create a sample to try and implement this behavior. I will get back to you tomorrow with more information or questions for you.
I wanted to update you on my progress investing your case. I currently have the functionality working correctly on the parent grid, however, need to do more research to figure out this functionality in the child grid. I have provided the simple function to gain this functionality in the parent grid in the below code snippet:
I will get back to you tomorrow with more information on implementing this in the child grid. Please let me know if you have any more questions.
I am glad we were able to resolve your issue. Please let me know if I can be of any further assistance.
Hi Joseph,
Thanks for your answer.
It works for simple cases : when only one column can be edited.
When I have for exemple 2 booleans columns, I can click first one to start editor, but when I click on second one, document receive the click end call to "endEdit" is raised => all editors are immediatly closed.A workaround in my case was to manage click on grid container DIV and use the "event.stopPropagation()".
Another tip. I am calling "endEdit", with first parameter "true". This allow changes to be saved before editor is closed.
Last thing : I need to give 'originalEvent' to "endEdit" (2nd parameter), because I need "editRowEnded" event to be raiseed when going out of edit mode.So I had to save last "originalEvent" inside "editCellStarting" to be able to use it when user is clicking on document.Thanks for your help.
Alain .
I have found a way for you to achieve the behavior you desire for you Hierarchical Grid. Please refer to the code snippet below which should be inserted into your script tags:
By including this code in your scripts, the editing for both the parent and child grids will close when clicking away from the grid. Please advise that where it says '.selector' in the code snippet should refer to your igHierarchicalGrid. This .click() event will be thrown for each parent of the originally clicked element including document. That is, unless the chain is broken by calling even.stopPropagation() in the handler for an element that's a closer parent. In creating your application, you will want to be sure that this does not happen.
I hope this helps to give you the functionality you were looking for. Please let me know if I can be of any more assistance.