Reputation: 228
I have a grid panel, I am using ExtJS 3.4 . I want to select a row and then when I click the update button, the values of the row selected has to be populated in a window. I tried using the rowselect and rowclick event, but both of it did not work. Can someone tell me how to do this.
Also,how to align the paging toolbar to the bottom of the screen?
this.grid= new Ext.grid.GridPanel({
layout: 'fit',
//autoHeight: true,
height: 556,
store: store,
columns:[
{header: "Book Name", dataIndex: 'bookName'},
{header: "Author Name", dataIndex: 'authorName'}
],
sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
bbar: new Ext.PagingToolbar({
store: store, // grid and PagingToolbar using same store
displayInfo: true,
pageSize: pgSize
}),
listeners:{
'rowselect': function(){
alert("Here");
}
}
});
Upvotes: 1
Views: 987
Reputation: 1951
Use getSelectionModel function to get the reference of grid's selected row
Sample fiddle here: https://fiddle.sencha.com/#fiddle/e5l
also bbar config should display toolbar at the bottom of the panel, not sure what problem you are facing..
Upvotes: 1