Set focus to newly added row in ui-grid
<p>I am using ui-grid. The use-case is such that on clicking a button, a new row is added. I want to set focus on the first cell of the newly added row Any suggestions on how to do it ? Here's a <a href="http://plnkr.co/edit/6zyZ5q" rel="nofollow"><code>plunkr</code></a> for the same.
<a href="http://plnkr.co/edit/6zyZ5q" rel="nofollow">http://plnkr.co/edit/6zyZ5q</a></p>

<pre><code>$scope.addNew = function() {
var newobj = {"id": "","name":"" }; 
$scope.gridOptions.data.unshift(newobj);
$scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.ROW); 

//set focus to the new row 
$scope.gridApi.cellNav.scrollToFocus( $scope.gridOptions.data[0], $scope.gridOptions.columnDefs[0]);
};
</code></pre>