I have a (very big) content type (a Program) that uses a data grid field to store Courses, and one of the attributes of a course is a syllabus (e.g. a PDF).
I've stepped through the z3c.form and datagridfield code and, ugh, I'm sure there are reasons why z3c.form is this complex, but perhaps my brain will never grasp them. OTOH, this is my first really deep dive into it.
Assuming I can't figure out this bug, what would a good UI alternative be for storing these courses? There can be a variable number of courses. The Program type is folderish, so I suppose I could just have it contain Course objects.
Do you use DGF with NamedFile or NamedImage fields in the row schema? That is the particular bug I refer to: you can set the file (or image) and save, but if you edit the main content item again, whether you modify the file or leave it untouched ("Keep existing file"), when you try to save the main content item, the file shows as not having been set and causes a validation error.
As @davisagli mentioned in that issue 6 years ago (and I think in another response to a post of mine when I had a similar issue with PFG and DGF ~3-4 years ago), the problem is that the DGF reconstructs the contained widgets on save, incorrectly in the case of NamedFile and NamedImage widgets because the nochange action in the POST is not handled during that reconstruction.