Most of the advice in .NET forums suggest exactly what the error message says -- namely, that something went wrong when adding controls dynamically. However, this message can occur in, what seems to me, completely different scenarios. I imagine many more scenarios will be added in the future for this error message, but I'll start with this simple one:
The CommandNames "Delete", "Update", "Insert" and "Cancel" seem to be reserved for EditItemTemplates and InsertItemTemplates. If you have a cancel button in the ItemTemplate (Readonly), ensure you give it a unique CommandName.
Changing the CommandName for the Cancel Button in the ItemTemplate to "_Cancel" and leaving the EditItemTemplate Cancel button's CommandName as "Cancel", worked for me. It simply meant that I needed to add another case value to my ItemCommand event routine: