Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get selected rows of a grid panel in ExtJs?

Tags:

extjs

extjs4

I want to get the surname fields of the selected rows. This one does not work at all:

users.getSelectionModel().getSelections();

like image 818
ilhan Avatar asked Aug 08 '11 10:08

ilhan


People also ask

How to get selected row data in extjs grid?

var selectedRecord = grid. getSelectionModel(). getSelection()[0]; var row = grid. store.

How do I create a grid in Extjs?

create('Ext. grid. Panel', { store: userStore, columns: ..., dockedItems: [{ xtype: 'pagingtoolbar', store: userStore, // same store GridPanel is using dock: 'bottom', displayInfo: true }] }); See the Paging Grid for a working example.


1 Answers

How about users.getSelectionModel().getSelection(); ?

getSelections() was used in ExtJS3. In ExtJS4, they decided to improve grammar a little it seems: ExtJS4 docs for Ext.selection.Model

like image 94
Mchl Avatar answered Sep 28 '22 05:09

Mchl