Currently, I want to select the first row in Kendo Grid. Here is my code: in Component:
export class SampleComponent{
gridView: GridDataResult;
mySelection: number[] = [0];
state: State = { skip: 0, take: 6, sort: [{ dir: "desc", field: "id" }]};
...
}
In HTMl:
<kendo-grid id="grid"
[data]="gridView" [pageSize]="state.take"
[skip]="state.skip" [selectable]="true"
(selectionChange)="onSelect($event)"
(sortChange)="sortChange($event)"
[sort]="state.sort" [filter]="state.filter"
[sortable]="true" [kendoGridSelectBy]="'id'"
[selectedKeys]="mySelection" [height]="'auto'" [scrollable]="'none'">
My issue is: the first row of Grid is not selected. How do i workaround with it?
Please help me.