jquery-datatables

Select all contents from all pages from a DataTable using Jquery

感情迁移 提交于 2019-12-09 13:22:59
问题 I am using a DataTable that has multiple pages in it. I use Select All (jQuery based) functionality which works well to select all records in the current page being viewed. But the problem is I am not able to select all records across different pages in a table If I select record in one page and move to next page , records selected in first page are lost. select all script $(document).ready(function() { $('#checkall').click(function(event) { //on click if(this.checked) { // check select

Jquery DataTables to exclude rows with a certain class

陌路散爱 提交于 2019-12-09 13:21:20
问题 I have an HTML table in which I have applied the DataTables function to. I use the first row of the table with the class 'template' applied as my template row. Then pick this formatting up and populate all the rows in the table using a JSON feed. The problem is that the pagination provided by DataTables includes this hidden template row so always makes my first page display 1 less row than all the others. Is there a way to exclude any rows (of which there will only be one) with the class

DataTables: Make url query string from table filter

二次信任 提交于 2019-12-09 06:13:08
问题 When I search or clicked filter in a table, I want to make url query from table to share this url to someone. Does somebody know how this is possible? This is my code $("#example").dataTable({ "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]], "iDisplayLength": -1, "fnStateSave": function(oSettings, oData) { localStorage.setItem('DataTables_' + window.location.pathname, JSON.stringify(oData)); }, "fnStateLoad": function(oSettings) { return JSON.parse(localStorage.getItem(

Datatables .row() is undefined

泄露秘密 提交于 2019-12-08 15:42:21
问题 i want to delete rows by simply clicking related Button.. data tables is works, i can use some basic function like sort and search in datatable , but when i click the button it just simply said undefined error : for your information, im using datatable 1.10 and jquery 1.10.2 Code : <table cellpadding="0" cellspacing="0" border="0" class="row-border" id="table"> <thead> <th>Video ID</th> <th>Filename</th> <th>Action</th> </thead> <tbody> <td>1</td> <td>ABCD</td> <td><input type='button' name=

DataTables move rows between tables

空扰寡人 提交于 2019-12-08 05:41:53
问题 I'm building a simple interface for a sql query result. I've choose to use DataTables and with it help I've created something like this: http://live.datatables.net/izavon/18/edit#javascript,html,live I have problem with moving rows from one table to another, right now I have 2 functions that do their job, but I would like to have one function, because my solution only works in one direction-I can move from one table to another just ones. $(".deleteMe1").on("click", function (event) { var row

jQuery DataTables - sort numbers only

。_饼干妹妹 提交于 2019-12-08 04:15:59
问题 Using 1.10.1 and the new data-sort html5 attributes I want to ignore certain cells from the sort order. My column is mixed with number and text values. Example: <tr><td data-sort="100.50">100.50 USD</td></tr> <tr><td data-sort="">Text</td></tr> <tr><td data-sort="50.00">50.00 USD</td></tr> When sorting on this column I want the text cells to be ignored. So descending order would be 100,50,Text. Ascending order would be 50,100,Text. Can I accomplish this with the data-sort attributes only or

JQuery DataTable not working on Meteor

为君一笑 提交于 2019-12-08 02:26:35
问题 I am trying to implement jQuery DataTables in my Meteor project, but I am always getting the following error. Can someone please tell me what I am missing / doing wrong here? Below is my Meteor app code. Thanks. Uncaught TypeError: Cannot set property 'pagesData' of undefined underscore.js:848 Error: Exception from Tracker recompute function: Error: Can't call non-function: undefined at Spacebars.call (http://localhost:3000/packages/spacebars.js?cb20740019f26bdca2faa89ba9c973f618118521:172:13

How to get an hidden column value in mRender() function from ajax data source in jQuery datatable

匆匆过客 提交于 2019-12-08 01:46:49
问题 I am trying to create a jQuery datatable from a ajax source in asp.net mvc5. I want to add an extra column for edit and delete which is not in my model class or in ajax data-source.For the edit and delete functionality I need the value of the Id column which I have not shown in my datatable. Here is my Model class: public class Country { public int Id { get; set; } [Required(ErrorMessage = "Country Code Name Must not be empty")] public String Code { get; set; } [Required(ErrorMessage =

DataTables detail row without nesting

こ雲淡風輕ζ 提交于 2019-12-08 00:50:01
问题 I'm trying to make a table with nested data inside. I want to have one set of column headers at the top of the table and have them carry through the entire table. To this end, I've started adapting the Row Details example for my needs. The code: var table = this.$el.attr({ 'width': '100%', 'class': 'table table-striped table-hover' }).DataTable({ data: data, autoWidth: true, paging: false, order: [[0,'asc']], columns: [ { 'width':15, 'class':'details-control', 'orderable':false, 'data':null,

datatables add combobox as a column

我怕爱的太早我们不能终老 提交于 2019-12-07 13:07:00
问题 I have got a datatable using Datatables. I have created and filled the table as shown below. Now I need to implement a combobox (assume that I have got 2010, 2011,2012) to allow the user select a year . then when user clicks View or Modify link, which is placed in the table, selected year will be passed to another page as a parameter. Now how can I turn my year column into a combobox? rulesTableGlobal = $('#rulesTable').dataTable( { //"bJQueryUI": true, "sPaginationType": "full_numbers",