Get selected row from DataGrid

Tutorial » Get selected row from DataGrid

This example show how to get the selected row data.

The datagrid component contains two methods to retrieve selected row data:

  • getSelected: Get the first selected row data, if no row selected return null else return the record.
  • getSelections: Get all selected row data, return array data which element is the record.

Create DataGrid

Usage demos

To get the selected row data:

To get all selected itemid:

Download the EasyUI example:

easyui-datagrid-demo.zip