Data Grid - Put all rows in edit mode

1 Answer 34 Views
Grid
Jason
Top achievements
Rank 1
Jason asked on 30 Apr 2021, 03:48 PM
I am trying to use the data grid for mapping a source to a destination.  I would like to have a grid toolbar command that puts all rows in edit mode and then while in edit mode either disable or hide the button.  Is this feasible if so, any guidance on how to do this?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 30 Apr 2021, 03:53 PM

Hi Jason,

Such a scenarios where something is editable from top to bottom feels more like a case for a spreadsheet component, the grid is designed to work per-row rather than be a huge editable spreadsheet. You can Follow the implementation of a native one here: https://feedback.telerik.com/blazor/1442151-spreadsheet-component and in the meantime you can consider the Kendo widget.

With the grid you could do that by using the row template or cell template and having conditional markup that puts editors in place of the texts. Note that this would not rely on the built-in editing of the grid and you would need to take care of all data operations yourself (such as updating the concrete row model, the main data collection in the view-model and the database). You would also need to make sure to use the appropriate editor for each field according to its type, which is something the grid does for you otherwise.

Regards,
Marin Bratanov
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.

Jason
Top achievements
Rank 1
commented on 30 Apr 2021, 05:48 PM

Thank you, I completely forgot about the row and cell templates.
Tags
Grid
Asked by
Jason
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or