ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
duplicate/repeat row button in grid inline editing
Title:
B
I
{code}
?
I want to add a column with a repeat row button in my grid with inline editing. When user clicks on this repeat, the corresponding row will be added to the grid for user to further modify this. new Column { ClientFormat = "<button type=\"button\" class=\"awe-btn o-pad repeatRow\" >Repeat</button>" } Can you help ?
Save Changes
Cancel
Riya Dasgupta
asked at 26 Feb 2021
Answers
B
I
{code}
?
You can add this code after the grid, to duplicate existing (rows that have been saved) $(function(){ var g = $('#grid1'); var api = g.data('api'); g.on('click', '.repeatRow', function(){ var model = api.model($(this).closest('.awe-row')); api.inlineCreate(model); }); });
Save Changes
Cancel
Omu
answered at 26 Feb 2021
I need to duplicate unsaved rows, that are still in inline create mode
at 02 Mar 2021
Riya Dasgupta
try this: var arr = $(this).closest('.awe-row').find(':input').serializeArray(); var model = utils.serializeObj(arr); api.inlineCreate(model);
at 02 Mar 2021
Omu
sorry for the confusion. That worked!
at 02 Mar 2021
Riya Dasgupta
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK