Extjs – Load the first record in a grid after the data store loads

Here’s a really quick bit of code that will select the first row in an ext data grid after the store gets loaded. I use this all the time as I generally have events connected to a row click, such as populating a form, or showing a grid in another panel, and I have been told by many users that they do not like to fire up the app and see blank space, etc. This provides a quick solution.

Ext.getCmp('your-grid').store.on('load', function(){
                                var grid = Ext.getCmp('your-grid');
                                grid.getSelectionModel().selectRow(0);
                                grid.fireEvent('rowclick', grid, 0)
}, this, {
single: true
});

The Art of Purposeful Storytelling

How your smart phone might save your life

Eric Topal delivered the speech below at Ted Med 2009 outlining medical monitoring products and capabilities are coming to the market in the near future, almost all of them could be tied to a smart phone so that a patients vital signs could be monitored from anywhere. This will certainly allow us to see real data that defines our health, such as the real number of calories vs. the expenditure or even our sleep patterns.