When cell editing is attempted in an igGrid, and all the others cells on the same row are read-only, the Done button is disabled even if the current cell has been modified. After a row with more editable cells is edited, then when editing the row with only one editable cell the Done button correct behavior is restored.
All read-only cells are disabled using “editCellStarting” method.
Please check this out here: http://jsfiddle.net/D3uPN/4/
Edit first row and change cell value, “Done” button still disabled.
Cancel and edit second row, press done.
Edit first row, now the “Done” buttons works correct.
Am i doing something wrong, or is this a bug?
Hello Corne van Beek,
Thank you for contacting Infragistics!
We received your support request concerning cell editing in the igGrid, and I have been assigned to assist you with this issue. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of this functionality, and I will be doing testing to see if I can reproduce this behavior. I will get back to you by the end of the day tomorrow with more questions or information for you. In the meantime, please do not hesitate to contact me with more questions.
After reviewing the issue you were having, I believe I have found the cause. It seems your editCellStarting function returning false messes with the Updating feature and causes the behavior you were receiving. Fortunately, this can be avoided by editing the columnSettings of you Updating feature. By setting the columns which you do not want to edit to readOnly, it prevents them from going into edit mode. This allows you to choose which columns you want to have an editor pop up for without the use of the editCellStarting function. I have attached a simple sample which shows this behavior. You will note that in this sample, only one of the cells opens for editing, even though the editMode is row. I hope this clears things up for you. Please do not hesitate to contact me with more questions.
Hi Joe,
Your example shows only static readonly cells. As I showed in my example, I want based on a status/value to have more dynamic readonly cells.
So based on some condition I want cells to be readonly or not. Thats why I used the editCellStarting event.
Is this possible or should I look at other solutions?
I apologize for the misunderstanding. Please view the attached sample with the correct functionality. You will see that I used the editCellStarting event which is called when a row begins editing for each column. In this function, you can check the value in the cell and return false if it contains a value you do not want to edit. Returning false will disable editing in that cell, as desired. Please let me know if you have any questions, or if I can be of further assistance.
I've looked into the fiddle some more, since your example does work. The problem is the datepicker with the required: true option. When you remove that option, everything works as expected. With that option enabled it doesn't work. Maybe because it thinks the row is not valid because of the required datepicker? Since that cell is disabled, that should not be the case.
So after editing a row with the datepicker cell enabled it all works because the datepicker now has (had) a valid value.
Is there anything else I can assist you with on the matter? Please do not hesitate to contact me with more questions.
Hello Corne,
This issue is now fixed in the latest service release for 13.2, 14.1, and 14.2. The service release is available under your account at the Infragistics website. To download the service release, select Support/Account, sign in to the page, and then click on your account name. This will take you to the My Keys & Downloads page. Select the appropriate tab for this product and then the license key. The available service releases should now be available in a tab at the bottom of the page.
Please let me know if I may be of any further help.
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 176263. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
The issue you were receiving seems to be a bug. I will get back to you with more information on this tomorrow.
I see the issue you are receiving now after adding the required tag in the columnSettings. This is something I will have to research further, as I believe it may be a bug. For the time being, I would use the workaround you have found if it is giving proper functionality. I will continue to look into this and get back to you when I have an explanation for this behavior.
Yes I am sure I edit the value
Did you set the Age column to required like so:
{ columnKey: "Age", required: true, readOnly: value2},
I edited and attached your old example to show you the issue.
Try to edit row 1 or 3, and you will see the done button will not enable!
Change selection to row 2, (doesn't matter if you edit or not)
Go back to row 1 or 3, and you will see the Done button wil now enable after an edit.