angular-datatables

Disable column sorting not working for multiple angularjs datatables

一世执手 提交于 2019-12-04 04:43:01
问题 I am working with multiple angularjs data tables and generating a new table every time user selects an option from the drop down list.Based on the user's selection i make an $http request to fetch new data from the database .For every table i have different dtColumnDefs which is set dynamically since my table column headers are dynamic except 1st two and last columns.My intention is to disable sorting for these dynamic column headers.I am able to find out total number of dynamic columns then

How to populate table values dynamically based on JSON in datatable angular?

元气小坏坏 提交于 2019-12-03 15:53:57
I'm using Angular-Datatables . I need to be able to dynamically create the table based on the data that is being returned. In other words, I do not want to specify the column headers. Example: json data: [ { "id": "2", "city": "Baltimore", "state": "MD", }, { "id": "5", "city": "Boston", "state": "MA", }, { "id": "8", "city": "Malvern", "state": "PA", }, ] Column Headers: id, city, state Can someone please help with this? That is actually a good question! With traditional jQuery dataTables it is not a problem, but we have a different kind of declarative setup with angular dataTables, making it

Angular DataTable not populating DTInstance

匆匆过客 提交于 2019-12-02 07:23:55
问题 I am not getting my DtInstance populated after rendering. Anyone faced this issue. <div ng-controller="InventoryTableController as vm"> <table datatable="" dt-options="vm.dtOptions" dt-columns="vm.dtColumns" dt-instance="vm.dtInstance" class="display table table-bordered table-striped table-hover"></table> </div> 回答1: I was able to fix it by this https://github.com/l-lin/angular-datatables/issues/365 The problem was due to I initialized the dataHolder like this vm.dtInstance = {}; It fixed

Angular DataTable not populating DTInstance

人盡茶涼 提交于 2019-12-02 03:05:23
I am not getting my DtInstance populated after rendering. Anyone faced this issue. <div ng-controller="InventoryTableController as vm"> <table datatable="" dt-options="vm.dtOptions" dt-columns="vm.dtColumns" dt-instance="vm.dtInstance" class="display table table-bordered table-striped table-hover"></table> </div> I was able to fix it by this https://github.com/l-lin/angular-datatables/issues/365 The problem was due to I initialized the dataHolder like this vm.dtInstance = {}; It fixed when I changed it into vm.dtInstance = null; even vm.dtInstance = undefined wont work. For me even vm

angular-datatable column draggable out of the table

时光毁灭记忆、已成空白 提交于 2019-12-02 02:59:28
问题 Is it possible to avoid the column, not to drag out of the data-table view area, as you can make out yourself, what I am talking about from this link https://l-lin.github.io/angular-datatables/#/withColReorder when you try to drag a column far from data-table. I have raised the issue in the official component site https://github.com/l-lin/angular-datatables/issues/496 (Just in case the issue raised, explains better about what I am talking about) 回答1: As l-lin points out, angular-datatables is

angular-datatable column draggable out of the table

被刻印的时光 ゝ 提交于 2019-12-01 23:06:43
Is it possible to avoid the column, not to drag out of the data-table view area, as you can make out yourself, what I am talking about from this link https://l-lin.github.io/angular-datatables/#/withColReorder when you try to drag a column far from data-table. I have raised the issue in the official component site https://github.com/l-lin/angular-datatables/issues/496 (Just in case the issue raised, explains better about what I am talking about) As l-lin points out, angular-datatables is a wrapper for jQuery dataTables providing directives and making sure dataTables not is conflicting with

Disable column sorting not working for multiple angularjs datatables

心已入冬 提交于 2019-12-01 20:45:00
I am working with multiple angularjs data tables and generating a new table every time user selects an option from the drop down list.Based on the user's selection i make an $http request to fetch new data from the database .For every table i have different dtColumnDefs which is set dynamically since my table column headers are dynamic except 1st two and last columns.My intention is to disable sorting for these dynamic column headers.I am able to find out total number of dynamic columns then run a loop to dynamically disable sorting on those columns.Though the data table renders successfully

How to call the destroy function of angular datatables?

喜夏-厌秋 提交于 2019-12-01 09:34:01
I have a controller and I want to call the destroy function of Jquery Datatables in the controller in a watch method: $scope.$watch('model.SelectedWaiver', function() { if ($scope.model.SelectedWaiver.SurchargeID != null) { //destroy table here $scope.getIndecies($scope.model.SelectedWaiver); } }); I am not setting up the table in any way currently because there are two tables on the page: first: <table datatable="ng" dt-options="dtOptions" dt-columns="dtColumns" class="table-bordered"> //stuff </table> second: <table datatable="ng" id="secondTable" dt-options="dtOptions" dt-columns="dtColumns

How to call the destroy function of angular datatables?

て烟熏妆下的殇ゞ 提交于 2019-12-01 05:50:46
问题 I have a controller and I want to call the destroy function of Jquery Datatables in the controller in a watch method: $scope.$watch('model.SelectedWaiver', function() { if ($scope.model.SelectedWaiver.SurchargeID != null) { //destroy table here $scope.getIndecies($scope.model.SelectedWaiver); } }); I am not setting up the table in any way currently because there are two tables on the page: first: <table datatable="ng" dt-options="dtOptions" dt-columns="dtColumns" class="table-bordered"> /

Custom loading in Angular Datatables

China☆狼群 提交于 2019-12-01 05:32:33
问题 im trying to implement my custom loading in angular datatables. I checked the docs :https://l-lin.github.io/angular-datatables/#/overrideLoadingTpl, there suggest an implementation: angular.module('showcase', ['datatables']). factory('DTLoadingTemplate', dtLoadingTemplate); function dtLoadingTemplate() { return { html: '<img src="images/loading.gif">' }; } So, in my custom Options i inject the loading in the option sLoadingRecords and sProcessing , but doesnt works. .factory('myDTOptions',