I have a cfgrid that is editable. Two colums are visible, one is the primary key and is not visible or selectable.
Upon making an edit to a row, submitting the form and doing a cfdump of the form, something very odd is apparent:
This is when the grid is first populated.
| query |
|---|
| | CFGRIDROWINDEX | ID | IDTYPE | ID_ID |
| 1 | 1 | 0000 | WGN | 11093 |
I change the value of ID to 0001 and leave everything else the same (ID_ID is the pk). Upon submitting the form and doing a quick cfdump before anything is updated to the db...
| IDGRID.ID | |
| IDGRID.IDTYPE | |
| IDGRID.ID_ID | |
| IDGRID.ORIGINAL.ID | |
| IDGRID.ORIGINAL.IDTYPE | |
| IDGRID.ORIGINAL.ID_ID | |
| IDGRID.ROWSTATUS.ACTION | |
The values are all messed up. grid.original.id actually has the updated value. And it mistakenly puts the orignal value into an updated value for idtype.
This ends up updating the wrong fields in my db!
What the heck?