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
answered on 30 Apr 2021, 03:53 PM
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.