Hello,
I want to add a button next to my grid that’ll clone the selected row into a new row in the same grid. This new row (child) has to be identical to it’s originating row (parent) but also independent, to allow users to change it’s content without affecting the parent row.
Works well until I save/refresh the data. Seems like the parent and child records share the same “uid”, so all changes performed on the “child” are also applied in the parent record (and vice versa)
fiddle
I modified your “addrow” fiddle to display what I mean.
Steps:
1)Check the uid of any row by selecting it and then hit “Info”
2)Clone this row by hitting “Clone Row”
3)Check the uid of the original and cloned rows (they will be identical, and the parent row will use the child’s uid)
4)Modify content of a cell of the child (cloned) record, such as the last name
5)Add a new row or clone another row to make the renedring to be refreshed, you’ll see all clones to then be alike.
Note my grid uses binded xml data, in case it makes a difference in your recommended fix.
jb