Hi,
Please see attached example.
I have an editable grid with four columns: Last Name (read-only), First Name(read-only), Date (editable/required), and Score (editable/required). The standard edit option buttons are "Done" and "Cancel" to which I've added a couple of others: "Apply Defaults" and "Remove Score". My question is in relation to the "Remove Score" button. When clicked this button correctly clears the Date and Score values for the row, however the "Done" button remains disabled as if the row has not been edited (is not dirty).
Also please note that when the "Remove Scores" button is clicked I would like to disable the validators for Date and Score for this row, allowing the user to click "Done" on the row and ultimately save the empty values for this row. The validators should remain in effect unless and until the "Remove Scores" button is clicked.
Many Thanks,
Rick
Hello Rick,
Thank you for the code attachment!
In order to disable the validation when clicking Remove Score btn, I suggest simply change the columnSettings, so the dateCompleted and score columns are not required. When the cells are already set as empty, set required: true for these columns again. This will however skip the use of done btn and set the corresponding row as edited.
Please let me know if this approach is suitable for you!
I am attaching a modified version of the initial attachment.
This seems to work well except for when save the Infragistics Grid Model's "LoadTransactions" method does not seem to like the empty value('') coming back from the date field.
Here is the specific error: DateTime content '' does not start with '\/Date(' and end with ')\/' as required for JSON.
I've attached a screenshot of the error...
Thanks.
I fixed this by replacing the empty string value with null.
Thank you!