Copy Code code as follows:
Grid.getstore (). GetRange (0,store.getcount ()); Get all the lines in grid
Copy Code code as follows:
Grid.getselectionmodel (). Getselections (); Get All rows selected
Note: If you do not declare var sm = new Ext.grid.CheckboxSelectionModel (), the sentence does not have the object or property
Var selectrows = Grid.getselectionmodel (). Getselections ();
Selectrows[0].get ("Dataindex property value for a column in Gird")//The value of a column with a selected row record
Copy Code code as follows:
Grid.selModel.selections.items; Get All rows selected
Copy Code code as follows:
Grid.getselectionmodel (). getselected (); Get the first line of the selection line
Copy Code code as follows:
When you click a row in Gird to get the data for that row
Prolevelgrid.on (' Rowclick ', function (prolevelgrid,rowindex,event) {
var record = Prolevelgrid.getstore (). GetAt (RowIndex);
Addproductlevel_form.getform (). Loadrecord (record);
Alert (record.get (' id '));
});
Copy Code code as follows:
var Grid1_rowclick = function (a,b,c) {
Get data for a particular column in a column
var id = a.getstore (). GetAt (b). Get ("id");
}