Clone record in Editor
Clone record in Editor
360webmarketin
Posts: 3Questions: 0Answers: 0
Hello Alan
I'm using Editor, and i want to add a button that makes duplicate a database entry and insert it after te original entry.
Is this possible ?
Anouar
I'm using Editor, and i want to add a button that makes duplicate a database entry and insert it after te original entry.
Is this possible ?
Anouar
This discussion has been closed.
Replies
[code]
var data = this.fnGetSelectedData();
if ( data !== 1 ) {
return;
}
editor.create( null, null, false );
editor.set( 'name', data[0].name );
editor.set( 'access', data[0].access );
// ...
editor.submit();
[/code]
I've only got it working on a single row there, but I'm sure you can see how you could actually extend it to work on multiple rows if needed as well.
Regards,
Allan