Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ng-grid paging
Message
 
 
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01609778
Message ID:
01609933
Views:
43
>Trying things at random means you are just thrashing around. If something doesn't work then debug 'till you find out why - then look for the solution.

How exactly I am supposed to debug this? We're using min version.

Here is what I just tried using the same approach we have in other forms:
//       $scope.gridData = [];        
          $scope.gridOptions = {
              data: 'currentAccount.invoices',
              showFooter: true,
              enableColumnResize: true,
              enableColumnReordering: true,
              enableRowSelection: false,
              enablePaging: false,

              totalServerItems: 'totalServerItems',
              //pagingOptions: $scope.pagingOptions,
              filterOptions: $scope.filterOptions,
              //rowTemplate: '<div style="height: 100%" ng-class="{label label-danger pull-right: row.getProperty(\'hidden\') == true}"><div ng-style="{ \'cursor\': row.cursor }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}"><div class="ngVerticalBar" ng-style="{height: rowHeight}" ng-class="{ ngVerticalBarVisible: !$last }"> </div><div ng-cell></div></div></div>',
              columnDefs: [
              {
                  field: 'invoiceNo', displayName: 'Invoice #',
                  width: 70, resizable: true, sortable: true,
                  enableCellEdit: false,
                  cellTemplate: linkCellTemplate
              },
              { field: 'descrip', displayName: 'Description', width: 200, resizable: true, sortable: true },
              { field: 'created', displayName: 'Date Created', width: 150, resizable: true, sortable: true, cellFilter: "date: 'medium'" },

              {
                  field: 'balance', displayName: 'Balance', resizable: true, sortable: true,
                  cellTemplate: balanceCellTemplate
              }]
              //,plugins: [new ngGridFlexibleHeightPlugin()]
          };
This works fine (no paging, though). The grid correctly shows the data if I use data: 'currentAccount.invoices'.

When I try to use data: 'gridData' it refuses to show correctly. I am wondering if I should try to use something like currentAccount.pagedData then instead of gridData. Or may be the gridName is just bad name, but I think I tried using $scope.invoices before with the same result.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform