Angular ngGrid select row on page load

后端 未结 4 843
轻奢々
轻奢々 2021-01-02 01:01

My question is an extension to thisquestion

Getting select rows from ng-grid?

plunker - http://plnkr.co/edit/DiDitL?p=preview

I need a row to be sele

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-02 01:42

    Add $timeout to your Controller and do this:

    $timeout(function() { 
        $scope.gridOptions.selectRow(2, true); 
    });
    

    Example: http://plnkr.co/edit/hDv7b8?p=preview

提交回复
热议问题