grid.getStore().getRange(0,store.getCount() ;
grid.getSelectionModel().getSelections(); //Get all selected rows
//Note: If you do not declare var sm = new Ext.grid.CheckboxSelectionModel();, this sentence will be reported. The object or property
Var selectRows = grid.getSelectionModel().getSelections();
selectRows[0].get("dataIndex attribute value of a column in gird") //Get a column of the selected row record The value of
Copy the code
The code is as follows:
grid .selModel.selections.items; //Get all rows selected
The code is as follows :
grid.getSelectionModel().getSelected(); //Get the first row of the selected row
The code is as follows:
// Get the data of a row in the grid when you click on it
proLevelGrid.on('rowclick' , function(proLevelGrid,rowIndex,event){
var record = proLevelGrid.getStore().getAt(rowIndex);
addProductLevel_form.getForm().loadRecord(record);
alert(record.get( 'id')); });
Copy code
The code is as follows:
var grid1_RowClick = function(a,b,c){
// Get the data of a specific column
var id = a.getStore().getAt(b) .get("Id");