I was working on this just today, I did it the following way, hope it helps
var vm = this;
vm.departments = [];
getDepartments();
vm.gridOptions = {
data: "vm.departments",
...//other config options
}
vm.getDepartments = getDepartments;
function getDepartments() {
return dataservice.getDepartments().then(function (data) {
vm.departments = data;
return vm.departments;
});
}
On Sunday, September 23, 2018 at 3:56:33 AM UTC-7, jaffer sadiq wrote:
>
> Hi,
>
> I need to pass value in UI grid footer. I tried but didnt worl.
>
> $scope.gridOptions = {
>
>
> data: 'SearchGridData',
> paginationPageSizes: [50],
> enableSorting: true,
> paginationPageSize: 50,
> useExternalPagination: true,
> showGridFooter: true,
>
> gridFooterTemplate: '<div class="ui-grid-cell-contents"
> style="text-align: center" > <span class="ng-binding">Total Amount :
> {{ResponseData.Amount}}</span> </div>',
>
> // gridFooterTemplate: '<div class="ui-grid-cell-contents"
> style="text-align: center" > Total Amount : "' + $scope.TotalGridAmount +
> '" </div>',
> columnDefs: [
>
> {
> field: "TransactionID", width: 120},
> { field: "Date", width: 120 },
> { field: "OrderID", width: 120 },
> { field: "OrderName", width: 120 },
> { field: "Amount", width: 120 }],
> onRegisterApi: function(gridApi) {
> $scope.gridApi = gridApi;
> gridApi.pagination.on.paginationChanged($scope, function
> (newPage, pageSize) {
> paginationOptions.pageNumber = newPage;
> paginationOptions.pageSize = pageSize;
> $scope.DivprocessingMsg = true;
> transactionData();
> });
> }
> };
>
> * Responsedata.Amount is the value which is getting from database.
>
> if any one helps, it would be greatful
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.