Update all rows inside one column

1 Answer 1009 Views
Grid
Fraser
Top achievements
Rank 1
Fraser asked on 21 Aug 2021, 09:43 AM

Hi, I would like to update all rows inside one column. Each column would have its own input which will update the rest of the rows. Currently I have an existing edit batch table. I was wondeing if it was possible to:

1. select a column (maybe with checkbox)

2. Row 1 is empty, however will trigger a function

3. This function takes the input value (which the user will type) of row 1 cell and populate this value for every row inside the that column.

COL 1 || COL 2

---------------

row 1 || row 1

---------------

row Z || row Z

After this the user should still be able to activate the cancel button and the original data appears back in the table. The table data should not be saved unless the saved button is pressed.

I've tried a fucntion using a button where we would execute row.set(column, value), however this would refresh the grid table and the original data would reappear.

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 25 Aug 2021, 11:08 AM

Hello, Fraser,

Thank you for the provided details.

You are on the right track with the set() method. You can utilize it alongside the save event of the Grid which is fired once you change the value of a cell and close it.

I have prepared a Dojo example which you can examine:

https://dojo.telerik.com/@gdenchev/uXUJepAc

Changing the value of one of the Product Names will also update all of the other rows in that column. You'd still be able to cancel that change through the "Cancel" button.

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Fraser
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Share this question
or