function getSelectedTableName() { var grid = Ext.getCmp('tempTableGridId'); var rowSelectionModel = grid.getSelectionModel(); if (rowSelectionModel.hasSelection()) { var record = rowSelectionModel.getSelected(); var tableName = record.get('tableName'); return tableName; } else { return ''; } }
?