ng grid- mouseover
Hi, I have a grid, on mouseover the grid rows, there are few sections below the grid that should be refreshed based on the selected row. I am able to achieve the refresh by selecting the row in the gird using "selectedItems : $scope.mySelections," but i need to refresh the sections on mouseover in the grid row.
On mouseover the grid row, it should be highlighted and the selected row index is required.
Can someone suggest me how to write mouseover event for the grid row and get the row index?
I would look into using a custom row template and using a directive from the Angular UI project to handle the mouseover.
Thanks.It worked. I have a query on this. I created a custom row template and wrote a simple function for mouseover as below
Code: created Row template as per the site : http://angular-ui.github.io/ng-grid/ and added "ng-mouseover = "mouseOverThing(row)" in the div as below
rowTemplate:'
$scope.mouseOverThing = function(index) {
var mydata = $filter('filter')($scope.mylist, index.getProperty("userid"));
console.log("length:"+mydata.length);
for(i=0;i<mydata.length;i++) {
console.log("MouseOver Person row:"+mydata[i].name);
}
the log in the mouseover event is displayed 2 times. Can you please suggest me what is wrong in my code?Is this the correct way of doing?