How to get row index in angular ui-grid 3.0

后端 未结 6 736
执念已碎
执念已碎 2020-12-31 10:32

I\'m working with angular ui-grid version 3.0 and can not find the way to get the index of the row, to add a numeration column to the grid. I would like to help me.

6条回答
  •  我在风中等你
    2020-12-31 11:24

    by using this way to solve this problem...

    $http.get('./api/ioni_users')
            .success(function(data) {
                $scope.gridOptions.data = data;
                angular.forEach(data, function(data, index) {
                    data["index"] = index+1;
                    //data.push({"index":index+1})
                })
            });
    

提交回复
热议问题