How to get the selected row id of a GridPanel

430 views Asked by At

I have a GridPanel named GridPanel1 and a button to remove the selected row of the GridPanel, I want to get the selected row id by clicking a ext button and send the id to a directMethod. My code is:

var removeEmployee = function () {
    // CompanyZ.Delete(id); // Here I need the GridPanel selected row id
    console.log(mygrid);
}

Please can anyone help me?

1

There are 1 answers

0
Daniil Veriga On

Please use:

grid.getSelectionModel().getSelection()[0].getId()