datatables

Get Jquery data tables to sort on table that contains inputs

安稳与你 提交于 2020-01-02 05:33:05
问题 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

Datatables joining tables search and order stuck with codeigniter

好久不见. 提交于 2020-01-02 05:04:28
问题 I was follow this step to learn datatables with codeigniter. But I'm getting some error with joining two tables to use search at datatables. This is my error, And then as I see at the documentation AJAX error, the resolution is search finding error server at network request browser. And I'm getting 500 Internal Server Error. This is I copied the response body for the fault. Error Number: 42000/1064 You have an error in your SQL syntax; check the manual that corresponds to >your MySQL server

Datatables Width Overflow For A Lot Of Columns

点点圈 提交于 2020-01-02 03:16:07
问题 Woah, I have this serious problem with jquery datatables plugin. I have a table with a lot of columns (over 35 columns) and this table is overflow my div content. I have tried many ways (including solution at same problems in stack overflow) but still couldn't solve this problem. So, I really need your help here, please. :) Thank you thank you so much You can see the screenshot here. Here is the javascript code var list_table = $("#list_table").dataTable({ "sScrollX": "100%", "sScrollXInner":

How to populate rows of jQuery datatable with JSON object sent back from Spring MVC?

淺唱寂寞╮ 提交于 2020-01-01 16:05:50
问题 I have a Java (Spring MVC) backend that returns POJOs as JSON objects as follows: @RequestMapping(value = "/getWidgetsByType", method = RequestMethod.POST) public @ResponseBody List<WidgetVO> getWidgetsByType(@RequestParam("type") String type) { return widgetDAO.getWidgetsByType(token); } public class WidgetVO { private String type; private String name; private boolean isAwesome; // Getters and setters, etc. } In the frontend I'm trying to call /getWidgetsByType from inside a jQuery $.getJSON

How to drag and drop a column into another

£可爱£侵袭症+ 提交于 2020-01-01 15:58:59
问题 I am using: jquery.dataTables.js from: https://datatables.net I am trying to drag and drop a column from one table to another. EDIT: so basically what I want to do is: be able to drag and drop the names from table 2 into column called name in the table above after drag and drop the name the same should disappear from the table 2. case 2: if I add a new row using the button Add new Row I need be able to drag a drop the names from table 2 into that column name too. so basically I want to do a

How to drag and drop a column into another

强颜欢笑 提交于 2020-01-01 15:58:27
问题 I am using: jquery.dataTables.js from: https://datatables.net I am trying to drag and drop a column from one table to another. EDIT: so basically what I want to do is: be able to drag and drop the names from table 2 into column called name in the table above after drag and drop the name the same should disappear from the table 2. case 2: if I add a new row using the button Add new Row I need be able to drag a drop the names from table 2 into that column name too. so basically I want to do a

How to reload dataTable after deleting records/data?

和自甴很熟 提交于 2020-01-01 12:14:10
问题 I have generated records and each row has delete button, And when I click delete button it will delete the records from the db. Also, after delete it will reload dataTable. Any Help for this? DataTables: var table = $('#table').DataTable({ "processing": true, //some settings? }); jQuery: $(document).on('click', '[id^="delete-product-"]', function() { var id = this.id.split('-').pop(); $.ajax({ type: 'post', url: 'my_controller/delete_product', dataType: 'json', data: {id: id}, success:

how to add class to jquery.datatables columns?

夙愿已清 提交于 2020-01-01 09:32:57
问题 I made a large table for jquery.datatables which is works great for me. but i need a class name set to each td element relative to its column. fo example i want a column (including th and all td's) have a class="volume" . there is this issues: i use this code to initialize the class but it is not working. "aoColumnsDefs": [ { "sClass": "volume", "aTargets": [2] } ] EDIT: my table is created and refeshes dynamically. and it is made of a js-array which i prefer not to touch it ie. just to add

Datatables - how to pass search parameter in a url

邮差的信 提交于 2020-01-01 05:33:07
问题 I would like to be able to make a link to a page with a datatable which would pass a search parameter value in the url. The goal is to have the page with the datatable open pre-filtered with the search value parameter. I've set up a jsfiddle to work in with some sample data. http://jsfiddle.net/lbriquet/9CxYT/10/ The idea would be to add a parameter to the jsfiddle url so that the page would display with the search input value set to "firefox", for example, and the table filtered to show only

Datatables requested unknown parameter '0' for row 0

假装没事ソ 提交于 2020-01-01 04:33:06
问题 I've got this problem when i try to get data from clients table in the database DataTables warning: table id=example - Requested unknown parameter '0' for row 0. For more information about this error, please see http://datatables.net/tn/4 This is my Controller in Codeigniter class Clients extends CI_Controller { function header() { $data['hms'] = $this->config->item('page_title'); $this->load->view('header3',$data); } public function index() { //$this->datatables->select('*'); //$this-