datatables

ember js with datatables plugin

倖福魔咒の 提交于 2020-01-03 03:37:06
问题 I am trying the datatable jquery plugin with EMber JS. Looks like the moment Ember tries to update the DOM with some fresh data, it has a problem after datatable has styled and inserted some elements like search bar, twitter bootstrap pagination footer etc. The code is as follows App.TableView = Em.View.extend({ classNames:['table','table-striped','table-bordered','dataTable'], tagName:'table', didInsertElement:function (){ this.$().dataTable({ "sPaginationType": "bootstrap", "oLanguage": {

Cannot initialize Row Reordering plugin - rowReordering is not a function

自作多情 提交于 2020-01-03 02:29:51
问题 I'm using jQuery DataTables with Row Reordering add-on and for some reason I receive the following error message: Uncaught TypeError: $(...).DataTable(...).rowReordering is not a function when doing this: $(document).ready(function() { $('#demo').html('<table cellpadding="0" cellspacing="0" border="0" class="display cell-border" id="example" ></table>'); t = $('#example').DataTable({ "columns": [ {width: "10%", "className": "ageClass", "title": "Priority", "data": "priority" }, {"className":

DataTable Checkboxes not getting value

一曲冷凌霜 提交于 2020-01-02 16:58:11
问题 Long story short, So I am trying to use "POST" to obtain checkboxes value in my Flask Template. However I am using some dynamic table in Datatable (datatable-buttons) in my template. And these Datatable causes my post request to not work. (Without using the datatable, if it's just a long regular table, then my post request will work) What would be a correct way to parse DataTable Checkboxes value to POST request? Does anyone know what is wrong with my datatable definition? Lots of thanks! In

Server side sorted data not showing in same order in Datatables

那年仲夏 提交于 2020-01-02 14:03:41
问题 I am using Datatables to show data from a database. I am using CodeIgniter for serverside scripting. Here is the table image In my serverside coding, I query to my database order by Country and in descending order. I have checked CodeIgniter select query for debugging purpose i.e $this->db->get_compiled_select() and it is showing 'SELECT * FROM `tmp` ORDER BY `country` DESC' here tmp is my database name, and it's performing well. here is my json response from the database- (I can't show you

Adding more drop down or html elements to Datatable in Jquery

北战南征 提交于 2020-01-02 13:37:29
问题 Is it possible to add more drop down or other html elements to the Datatable after the default Display "5" record I want to add more drop down to my DataTable between the Default one and the Search Bar which is provided by default. I have gone through sDom but I am not able to understand the syntax. Thanks in advance. 回答1: You can insert an element <div> between the length menu and the filter box this way : var table = $('#example').DataTable({ dom : 'l<"#add">frtip' }) 'lfrtip' is the

Server Side Pagination with jQuery Data Tables plugin

本秂侑毒 提交于 2020-01-02 09:57:31
问题 How can I achieve server side pagination using data table ? Currently, on load of page I am initializing the data table & filling the table with Data (JSON) coming from database via Java Spring controller. I am making an Ajax call by passing search criteria in query string. Since we have hundreds of thousands of records, we have planned for server side pagination to improve performance. For this the backend service developer has given me a service that gives me the per page records but takes

How add more then one button in each row in JQuery datatables and how to apply event on them

感情迁移 提交于 2020-01-02 08:56:17
问题 I have one button but I need two buttons and perform some MySql when they are clicked to get data from the underlying database. How can I perform an event using these two buttons? $(document).ready(function () { var table= $('#example').dataTable( { "ajax": "..//wp-content/plugins/jobify/Admin/data.txt", "columnDefs": [ { "targets": -1, "data": null, "defaultContent": "<button>View Posted Jobs</button>" } ] } ); $('#example tbody').on( 'click', 'button', function () { //var data = table.row(

stripes for DT::datatable

独自空忆成欢 提交于 2020-01-02 07:23:41
问题 I am hoping to get a repeated pattern for the datatable in the code below where 3 rows are colored followed by 3 in white, then again colored... Can somebody please help me with code for that? Also, in my Shiny app there are several tables each of which may need different styles. Would appreciate an answer which shows how the style can be tied to a particular table so that I can use that to develop other styles for the other tables. require(shiny) require(DT) MkDF <- function(nr) { data.frame

dataTables JS Plugin responsive width overflows set div width

青春壹個敷衍的年華 提交于 2020-01-02 06:29:51
问题 Using the DataTables plugin for displaying tabular data I found that when setting a percentage width on the tables container div the plugin was performing a width calculation and setting a pixel width on the table which was actually wider than the div. This wasn't an issue when using the table at full width in responsive mode, but when trying at halfwidth it overshot the set width and forced the browser window to scroll horizontally. Code: $('#' + tableID).dataTable({ "dom": 'Rlfrtip', "ajax"

Get Jquery data tables to sort on table that contains inputs

喜你入骨 提交于 2020-01-02 05:33:09
问题 I've got a table that is a mixture of static <td> and inputs (wrapped in td) <td><input></td> . To sort through and filter the data ive used the Jquery data tables plugin the only problem is that it won't sort the <input> tags it just leaves them at the bottom of the sorted list (or top if you click it twice), although the search function still works on all cells. Is there a way to get Data Tables to recognize the values inside of the input tags and be able to sort them, I'm looking to do