Created
July 5, 2017 14:36
-
-
Save joelwatson/437eac89724c8ce9463859cdd5d5eab1 to your computer and use it in GitHub Desktop.
Selecting grid row based on column name and value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://examples.sencha.com/extjs/6.5.0/examples/kitchensink/?classic#array-grid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should select row from column "text" and value', function () { | |
var grid = ST.grid('grid'); | |
grid | |
.execute(function (cmp) { | |
var columns = cmp.getVisibleColumns(), | |
dataIndex = null, | |
column; | |
for (var i=0; i<columns.length; i++) { | |
column = columns[i]; | |
if (column.text === 'Company') { | |
dataIndex = column.dataIndex; | |
break; | |
} | |
} | |
return dataIndex; | |
}) | |
.and(function () { | |
var dataIndex = this.future.data.executeResult; | |
grid.selectWith(dataIndex, 'Twitterbeat'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment