We are using the 2016.2 version but can also reproduce this with the latest (2017.1). We have long column names and users who like to resize columns
Steps to reproduce:
1. Click the first column and change the text - I changed "Sales Representative" in the first record for Nancy to "Test"
2. Resize the first column so you can see the full column name.
Expected results: EditRowEnding event will show ui.update = true and will detect the changed values (in this example - I expected to see Sales Representative in the old values and Test in the new values Actual Results: EditRowEnding event does NOT detect the changed values - ui.update is false and the old values are the same as the new values even though I changed them prior to the row losing focus
I have included an example below:
https://jsfiddle.net/egnLm435/1/
Hi Tsanna,
The behavior in the example is exactly what we want! However I'm having a difficult time implementing this suggestion into our larger project.
When I debug the example, the resizing event happens before the edit row ending event, however when I debug our larger project, the edit row ending event happens first (and ui.update is always false).
Is there a setting or property to control the order the grid events are detected in? I'm trying to determine what could be causing the edit row ending event to be triggered first in our larger project but the resizing event to be triggered first in the example?
Thanks,Lisa
Hello Lisa,
You could use the same approach with a little difference. By calling endEdit API you should add update parameter with "true" value in order the edit process to accept the current changes. For example: $("#grid").igGridUpdating("endEdit", true);
"#grid"
).igGridUpdating(
"endEdit", true
);
Here is also the updated version of the jsFiddle for your reference: https://jsfiddle.net/egnLm435/10/
Please let me know if this works for your requirement.
Regards,Tsanna
This is the updated fiddle showing the workaround that we used in the past in 2015.2 but are unable to use in 2016.2 (and 2017.1). Is there a similar workaround that will work for us in the newer versions?
https://jsfiddle.net/egnLm435/9/
What would you suggest as a workaround for us?
I ask because this functionality was previously available to us in 2015.2 - in the past we were able to put the code below on the "iggridresizingcolumnresizing" event as a workaround and this allowed us to save changes, however this workaround no longer behaves the same in 2016.2
// save row edits before resizing if ($("#grid").igGridUpdating("isEditing")) { $("#grid").igGridUpdating("endEdit", true, true); }
I've modified the fiddle to use 2015.2 to demonstrate how this worked for us previously. Is our only option to downgrade to 2015.2 and lose the new features in 2016.2?
Please advise.
Changes after editing are saved when you either press Enter button or click on another record in the grid. Losing focus by clicking to resize the column header or clicking outside the grid doesn't apply the changes made previously, therefore ui.update will be false and the new value will be equal to the old value.
If you have further questions, please let me know.
Regards,
Tsanna