[Wijmo 5] Select and focus the row
Select and focus user defined row
HTML
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="http://cdn.wijmo.com/5.latest/styles/wijmo.min.css">
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.input.min.js"></script>
<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.grid.min.js"></script>
<div id="gsFlexGrid"></div>
JavaScript
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(',');
var count = 50;
var data = [];
for (var i = 0; i < count; i++) {
data.push({
id: i,
country: countries[i % countries.length],
date: new Date(2014, i % 12, i % 28),
amount: Math.random() * 10000,
active: i % 4 === 0
});
}
// create the grid and give it some data
var grid = new wijmo.grid.FlexGrid('#gsFlexGrid');
grid.itemsSource = data;
grid.select(new wijmo.grid.CellRange(40, 1, 40, 1), true);
grid.focus();