Page 1 of 1

Datatable editingRows

Posted: 29 Oct 2020, 12:31
by patrick_a1987
Hello, I have been trying to initialise the editingRows in multiple different ways to try and load my datatable with rows already in editor mode, or to set editor mode programatically on a selected row, however I can't seem to get it to work. In the documentation on row editing it clearly states
Row Editing is defined by setting cellEdit as "row", defining editingRows with the v-model directive to hold the reference to the editing rows and adding a row editor column to provide the editing controls. Note that since editingRows is two-way binding enabled, you may use it to initially display one or more rows in editing more or programmatically toggle row editing.
however there is no how-to. Could someone show me a working example of this please? :?

Re: Datatable editingRows

Posted: 06 Nov 2020, 22:22
by patrick_a1987
For anyone struggling with the same issue, turns out that the solution was quite simple and required direct re-assignment to this.editingRows - I previously tried adding a new value to it by using push.

Here's how I did it (while keeping rows - which were in edit mode - in editing mode):

Code: Select all

this.editingRows = [...this.editingRows, this.newRow]

Re: Datatable editingRows

Posted: 12 Nov 2020, 10:26
by mert.sincan
+1, thanks a lot for the update!

Best Regards,