angular-datatables

How to use server side option in Angular DataTables with the Angular way example?

淺唱寂寞╮ 提交于 2019-12-01 00:49:05
I'm trying to use Angular DataTables with the server side processing option, but when I try to enable it in their " Angular way example ", only the first request gets rendered, the subsequent requests (paging, ordering, searching) are sent but they never update the table. After a little digging, I found an unrelated user contributed note that suggests that you override the ajax option with your own function to handle the server side call. The trick here is to return an empty array to the DataTables callback, so it won't use its renderer to render the table. That will be done by Angular. It's

Angular 5 Material Data Table sorting not working

不想你离开。 提交于 2019-11-30 21:51:43
So I have a working Angular Material Data Table in my Angular 5 app, but when I tried adding the sorting functionality (based on the offical docs here: https://material.angular.io/components/table/overview#sorting and an example here: https://stackblitz.com/angular/dnbermjydavk?file=app%2Ftable-overview-example.html ) I can't get it to work. It does seem to add the sorting functionality/arrow, I can click it, but nothing happens. Here's my HTML: <div class="container"> <mat-table #table class="dataTable" *ngIf="showDataForm;else loadingTemplate" [dataSource]="dataSource" matSort> <ng-container

Datatables change interface language

僤鯓⒐⒋嵵緔 提交于 2019-11-30 19:09:55
I am currently using angular-datatables. How can I see the interface of the table in other languages? I mean the "Show entries", "Search:", "Showing 1 to 10 of 20 entries" literals fore example in Spanish. You need to define a language struct like this (danish implementation, what I am using in my angular-datatables apps) : var language = { "sEmptyTable": "Ingen tilgængelige data (prøv en anden søgning)", "sInfo": "Viser _START_ til _END_ af _TOTAL_ rækker", "sInfoEmpty": "Viser 0 til 0 af 0 rækker", "sInfoFiltered": "(filtreret ud af _MAX_ rækker ialt)", "sInfoPostFix": "", "sInfoThousands":

Angular 5 Material Data Table sorting not working

谁说我不能喝 提交于 2019-11-30 17:32:35
问题 So I have a working Angular Material Data Table in my Angular 5 app, but when I tried adding the sorting functionality (based on the offical docs here: https://material.angular.io/components/table/overview#sorting and an example here: https://stackblitz.com/angular/dnbermjydavk?file=app%2Ftable-overview-example.html ) I can't get it to work. It does seem to add the sorting functionality/arrow, I can click it, but nothing happens. Here's my HTML: <div class="container"> <mat-table #table class

Cannot read property 'aDataSort' of undefined in angular datatables

本小妞迷上赌 提交于 2019-11-30 09:14:04
I am trying to implement angular-datatables in my project but it returns "TypeError: Cannot read property 'aDataSort' of undefined I am using Angular js version 1.4.9. Jquery version 2.1.1 DataTable version 1.10.10 Refrence site angular-datatables My Html Code <div class="col-md-12" ng-controller="WithAjaxCtrl as showCase"> <table datatable="" dt-options="showCase.dtOptions" dt-columns="showCase.dtColumns" class="row-border hover"></table></div> My Angular js Controller code angular.module( 'admin.package', [ 'ui.router', 'ui.bootstrap', 'datatables', 'datatables.bootstrap', 'ngResource',

In Angular JS how to disable column sort feature for selected columns

荒凉一梦 提交于 2019-11-30 07:26:06
问题 In jquery data table I can disable specific column sort by "aoColumnDefs": [{ 'bSortable': false, 'aTargets': [0, 7] }] Anyone know how to do this in angular JS? <table class="custom-table" datatable="ng" dt-options="dtOptions" id="contacts-list-table"> </table> myApp.controller("ListCtr", ['DTOptionsBuilder', function(DTOptionsBuilder) { $scope.dtOptions = DTOptionsBuilder.newOptions().withDOM('C<"clear">lfrtip') }]) this code hiding my search bar but not able to hide sort feature of my

Include custom directives on DTColumnBuilder renderwidth

自古美人都是妖i 提交于 2019-11-29 16:30:15
Is there a way for DTColumnBuilder.newColumn.renderWidth to include custom directives? Here is a draft code of what I want to achieve. DTColumnBuilder.newColumn('reportStructureName').withTitle('Structure Name') .renderWith((data, type, full) => { return "<my-directive></my-directive>"; }), You can $compile the cell content in the createdCell callback. Here is a very simple example, with a directive that does nothing but coloring the text red. Sorry for not using arrow functions :) $scope.data = [ { reportStructureName : "structurename1" }, { reportStructureName : "structurename2" }, {

In Angular JS how to disable column sort feature for selected columns

故事扮演 提交于 2019-11-29 03:49:28
In jquery data table I can disable specific column sort by "aoColumnDefs": [{ 'bSortable': false, 'aTargets': [0, 7] }] Anyone know how to do this in angular JS? <table class="custom-table" datatable="ng" dt-options="dtOptions" id="contacts-list-table"> </table> myApp.controller("ListCtr", ['DTOptionsBuilder', function(DTOptionsBuilder) { $scope.dtOptions = DTOptionsBuilder.newOptions().withDOM('C<"clear">lfrtip') }]) this code hiding my search bar but not able to hide sort feature of my first and fourth column? The angular-datatables equivalence to aoColumnDefs: [{ bSortable: false, aTargets:

Include custom directives on DTColumnBuilder renderwidth

冷暖自知 提交于 2019-11-28 10:44:58
问题 Is there a way for DTColumnBuilder.newColumn.renderWidth to include custom directives? Here is a draft code of what I want to achieve. DTColumnBuilder.newColumn('reportStructureName').withTitle('Structure Name') .renderWith((data, type, full) => { return "<my-directive></my-directive>"; }), 回答1: You can $compile the cell content in the createdCell callback. Here is a very simple example, with a directive that does nothing but coloring the text red. Sorry for not using arrow functions :)

Get more than 1000 row in the data-table in Angular-JS from MongoDB?

时间秒杀一切 提交于 2019-11-28 02:28:04
I am implementing data-table and using MongoDb, Angular-Js. Data-table displaying max to max 1000 row. If API has 999 records then displaying 999 row, If API has 1001 then only displaying 1000 row. If API has 2000 Then also it is displaying 1000. $scope.standardOptions = DTOptionsBuilder .fromFnPromise(R.all('----api call--').getList()) .withDOM("<'dt-toolbar'<'col-xs-12 col-sm-6'f><'col-sm-6 col-xs-12 hidden-xs'l>r>" + "t" + "<'dt-toolbar-footer'<'col-sm-6 col-xs-12 hidden-xs'i><'col-xs-12 col-sm-6'p>>") .withBootstrap(); $scope.standardColumns = [ DTColumnBuilder.newColumn('flightNo')