This is the weirdest behavior I've ever seen...
I am working on a datagrid (editable="true"), and for some reason the thing does not want to sort correctly. It is a basic datagrid with itemrenderers for each column so that we can edit in the grid. Sorting should happen on a header-click, but if you click the header, it seems to simply select the first row, or another random row, and doesn't sort. It does fire the "itemEditEnd" event. However, if you click anywhere but the header, drag the mouse to header and then let go, (mouseUp on the header), then it sorts perfectly fine (and doesn't fire that event). If I take the "editable=true" off the datagrid, it sorts fine on header-clicks, but then the datagrid won't save.
Does anyone have any ideas? There isn't any custom behavior on the header, though I could add some if it would help. I've tried everything I can think of, but nothing seems to help.
This seems to be somewhat related to this (unsolved) issue.
I have noticed in the livedocs under, "Working with item renderers" (currently as I type this post the livedocs is unavailable, so I am able to give you a URL) there is a Datagrid that functions incorrectly when the user clicks on header columns. I am not sure why they haven't fixed this yet, but is this similar to what you are experiencing? I believe on the same page, they mention about the differences with creationComplete and dataChange. Are you listening to any of those events? creationComplete is rarely used in an itemrenderer. dataChange is used more often which I have noticed that a conditional statement is needed to prevent strange behavior (perhaps the same as you mentioned).
I let this go last time as we were unable to find an answer, however, we're hitting it again on another grid. That livedoc didn't seem to have anything helpful.
This seems very related to http://bugs.adobe.com/jira/browse/SDK-18302
It's happening now on a different datagrid that isn't editable to begin with, but clicking the header triggers the action as if you clicked one of the rows in the datagrid and tried to edit it (or in this case, triggers the "change" event). Again, if I click elsewhere and just mouseUp on the header, it sorts fine.