user777777
user777777

Reputation: 228

extjs3.4 gridpanel rowselect event not working

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

Answers (1)

newmount
newmount

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

Related Questions