Closed winpzs closed 6 years ago
Move focus to this cell and switch it to the editable mode?
import {CellEventArgs} from '../../ng-data-table/types';
this.table.events.onDblClickCell(<CellEventArgs>{columnIndex: 2, rowIndex: 0});
Or update the value of the cell?
this.table.rows[0]['name'] = 'new value';
this.table.events.onRowsChanged();
for example:
editRow() {
let rowIndex = 0;
let editMode = true;
for (let columnIndex = 1; columnIndex < 6; columnIndex++)
this.table.cellEditMode(rowIndex, columnIndex, editMode);
}
or
editRow() {
let rowIndex = 0;
let editing = true;
for (let columnIndex = 1; columnIndex < 6; columnIndex++)
this.table.cell(rowIndex, columnIndex).editing = editing;
}
Added function: editCell(rowIndex: number, columnIndex: number, editMode: boolean) how use
public settings: Settings = {
editMode: 'editProgrammatically'
};
editRow() {
let rowIndex = 0;
let editMode = true;
for (let columnIndex = 1; columnIndex < 6; columnIndex++)
this.table.editCell(rowIndex, columnIndex, editMode);
}
https://github.com/mazdik/ng-crud-table/commit/c066ca65357396a2f3ccbe4b91888d7ce6a768ca
thanks
for example: