I used to have CellEditing attached to a button with the following code:
function editRow() { // Find the WebDataGrid control and load it into a jQuery object. var grid = $find("dgvStaff"); // Find the active row var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row(); // Open the first non-hidden cell in the active row for editing grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().enterEditMode(activeRow.get_cell(2)); }
Is it possible to change this or add a new function that will allow a button to open up the RowEditing?
I was able to find this online.
function editRow() { // Find the WebDataGrid control and load it into a jQuery object. var grid = $find("dgvStaff"); // Find the active row var activeRow = grid.get_behaviors().get_activation().get_activeCell().get_row(); // Open the row for editing var ret = grid.get_behaviors().get_editingCore().get_behaviors().get_rowEditingTemplate();
ret.enterEditMode(activeRow); //grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing().enterEditMode(activeRow.get_cell(2)); }