Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1095
RowEditing Template attachment to a button
posted

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?

  • 1095
    Verified Answer
    posted

    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));
    }