Hi,
How to select row at initial rendering? But not by rowIndex, but by Id in record in my data.
How can i get rowIndex for my record with specified Id?
I try iterate on this.grid.dataSource in dataBound event (where this.grid is set by ref={g => this.grid = g}):
if (this.grid) {
let rowIndex = -1
this.grid.dataSource.forEach((row,index) => {
if (row.Id === this.props.selectedId) {
rowIndex = index
}
})
this.grid.selectRow(rowIndex);
}
but when I load data by UrlAdapter I get error: this.grid.dataSource.forEach is not a function