BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
<body ng-controller="PhoneListCtrl">
<a rel='nofollow' href="#" ng-click="clik()" title="View the uploaded rate data.">
<button>click</button>
</a>
<div class="content-container-fluid">
<div class="row">
<div class="cols-sample-area">
<div id="Grid" ej-grid e-datasource="data" e-allowpaging="true">
<div e-columns>
<div e-column e-type="checkbox"></div>
------------
</div>
</div>
</div>
</div>
</div>
<script>
var obj = [
-----------------
];
angular.module('listCtrl', ['ejangular'])
.controller('PhoneListCtrl', function ($scope) {
$scope.data = obj;
$scope.clik = function () {
var gridObj = $("#Grid").ejGrid('instance');
var selectedrecordIndex = gridObj.checkSelectedRowsIndexes; //Get the selected row index across all page wise
var selectedRecord = [];
for (var i = 0; i < selectedrecordIndex.length ; i++) {
if (ej.isNullOrUndefined(selectedrecordIndex[i]))
continue;
else {
for (var j = 0; j < selectedrecordIndex[i].length; j++) {
var index = selectedrecordIndex[i][j] + (i * gridObj.model.pageSettings.pageSize); //Calculate the index for retrieve those data in the data source
selectedRecord.push(gridObj.model.dataSource[index]); // push the selected record from the data source.
}
}
}
}
});
</script>
</body> |