View Full Version : Selecting 1st row in grid after store loads..

8 Jun 2010, 11:19 PM

I have a grid panel attached to a store and I would like to select the first item immediately after the store loads. What is the best way to do it?

Here is the code as a simplified example:

xtype: 'grid',
id: <>,
store: <>,
columns: <>,
sm: new Ext.grid.RowSelectionModel({
listeners: {
rowselect: function(Grid, RowIndex, Record) {
listeners: {
render: function() {
// I would like to select the first row in this grid panel after the store loads.

Thanks in advance..

8 Jun 2010, 11:20 PM

9 Jun 2010, 12:03 AM
Exactly what I was looking for! Thank you..

Also, how do I refer to the Grid itself from inside one of its event handlers?