datatables

Datatable showing wrong pagination when get data from server

若如初见. 提交于 2020-01-07 02:21:29
问题 In my webpage, I am using datatable to show the records. But when I try to show the data, data showing correctly but the pagination count is wrong. My code is oTableSp = $('#specials-table').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": <myUrl>', "bJQueryUI": true, "sPaginationType": "full_numbers", "iDisplayLength":25, "lengthMenu": [ 25, 50, 75, 100 ], "dom": '<"top"f>rt<"bottom row"<"col-md-3"l><"col-md-3"i><"col-md-6"p>>', "columns": [ { data: "SpecialName" }, {

Meteor - Make Datatables Reactive

醉酒当歌 提交于 2020-01-07 01:18:07
问题 I'm having a problem with my Meteor app. Apparently, the datatable does not update properly. When I save a new data, it automatically adds a new row, but the table is not updating correctly (e.g. it says 'Showing 1 to 6 of 6 entries' when in fact it has 7 entries already.) I also tried destroying the table then re-initializing it again, but no luck. I've read the autorun function, but I'm not sure how to implement it. Is there a way to manually refresh/re-render the template via JS? So that I

Changing columns dynamically with angular-datatables

故事扮演 提交于 2020-01-06 23:49:13
问题 I am using angular datatables, an angularized version of the popular jquery datatables library. Here is my html <body ng-controller="TestCtrl"> <input type="button" ng-click="changeColumns()" value="Change Columns"/> <table datatable="" dt-options="dtOptions" dt-columns="dtColumns" class="row-border hover"></table> </body> Here is my javascript var module = angular.module('TestApp', ['datatables']); module.controller('TestCtrl', [ '$scope', 'DTOptionsBuilder', 'DTColumnBuilder', function(

h:commandLink not working inside dataTable

对着背影说爱祢 提交于 2020-01-06 15:40:10
问题 In my JSF file I have below at the start. <h:form><h:commandLink value="Create New Staff Account" action="adminCreateStaffMember"/></h:form> . By use of this, when I create on Create New Staff Account I get re-directed to the page where I have form to create new account. BUT, When I use the same inside dataTable , NO ACTION is taken. I am still on same page :( <h:dataTable var="c" value="#{newStaffMemberServiceBean.newStaffMemberDataBeanList}" styleClass="order-table" headerClass="order-table

datatables are not updating in meteorjs

瘦欲@ 提交于 2020-01-06 15:14:05
问题 I am working on an application using meteorjs. I am totally new to meteor. In my application I am using dataTables with meteor for shorting , pagination and searching. This is my template code <template name="questions"> <div class="col-md-3"> {{#constant}} <table class="table table-striped table-bordered table-condensed table-hover listing" id="content_listing-table"> <thead> <tr> <th>Questions</th> </tr> </thead> <tbody> {{#each questions}} <tr> <td> <a href="#" data-id={{_id}} class="edit"

How to tell DataTables where to insert the buttons export

末鹿安然 提交于 2020-01-06 08:36:14
问题 I wanna archive something like this with datatables But I can't find a way how to tell datatable where to insert button copy, excel,PDF etc. Default insert button datatable will replace sorting entries like this This is my code <div class="box-header"> <div class="buttonContainer"></div> <div class="pull-right"> <button class="btn btn-primary form-button" id="addNew">Tambah Produk</button> </div> </div> and var dTable; dTable = $('#dataTable').DataTable({ "bProcessing": true, "bAutoWidth":

Why my jquery datatable shows data at first attempt but not for the subsequent attempt?

試著忘記壹切 提交于 2020-01-06 07:24:02
问题 I am using this to load a table but it works when I load it for the first time i.e. first request but on the subsequent request it fails to load the new data. I am using asp.net mvc with jquery datatable. Why Doesn't it work? THrows this error in console. I am getting "Cannot read property 'reload' of undefined" $('form').submit(function(e) { e.preventDefault(); if (!$(this).valid()) { $("#tbodytblServicesReport").html(""); return; } else { filltblServicesReport(); } }); function

Unbable to sort the columns

两盒软妹~` 提交于 2020-01-06 07:05:17
问题 I am using jQuery DataTables. searchResultsTable = $("#searchResultsTable").dataTable({ "bServerSide": true, "sAjaxSource": "searchResults.form", "bProcessing": false, "sPaginationType": "full_numbers", "oLanguage": {"sEmptyTable": "No data available", "sLengthMenu" :" _MENU_ items per page", "sInfo": "Showing _START_ to _END_ of _TOTAL_ records", "sInfoEmpty": "No entries to show"}, "sDom": 'tlip', "aaSorting": [], "aoColumns": [null,null,null,null,{ "bVisible": false }] }); I have provided

Unbable to sort the columns

老子叫甜甜 提交于 2020-01-06 07:03:42
问题 I am using jQuery DataTables. searchResultsTable = $("#searchResultsTable").dataTable({ "bServerSide": true, "sAjaxSource": "searchResults.form", "bProcessing": false, "sPaginationType": "full_numbers", "oLanguage": {"sEmptyTable": "No data available", "sLengthMenu" :" _MENU_ items per page", "sInfo": "Showing _START_ to _END_ of _TOTAL_ records", "sInfoEmpty": "No entries to show"}, "sDom": 'tlip', "aaSorting": [], "aoColumns": [null,null,null,null,{ "bVisible": false }] }); I have provided

Store selected rows id

只谈情不闲聊 提交于 2020-01-06 06:18:07
问题 I have a datatable loaded from a query from my database. (+/- 10000 records) The idea is that the user should be able to select multiple records to be later processed First i thought to add a column with checkbox for the selection then when user is done with all his selection the application keep track of all selected rows then progress to the next step with "Next Button" some where on the page, but after 12 hours of trying i couldn't do it. Then i thought to make it simpler by adding a