jquery-datatables

jQuery dataTables makeEditable() is not a function

狂风中的少年 提交于 2019-12-01 09:28:44
I'm new to Datatables and I'm trying to make the table editable, but I keep getting this error: TypeError: $(...).dataTable(...).makeEditable is not a function My jQuery script looks like this: $(document).ready( function () { var oTable = $('#data_table_wrapper').dataTable({ "sDom": 'R<"H"lfr>t<"F"ip<', "bJQueryUI": true, "sPaginationType": "full_numbers", "aoColumn": [ { "bVisible": true }, { "bVisible": true }, { "bSortable": false }, ] }).makeEditable({ sUpdateURL: "/abc.php" }); }); I am including these files: jquery-1.9.1.min.js jquery.dataTables.min.js jquery.jeditable.js jquery

How to use JQuery Datatable.net with ASP.Net 4 Razor and Twitter Bootstrap

吃可爱长大的小学妹 提交于 2019-12-01 09:20:16
I want to use the jQuery Datatable with ASP.net MVC and Twitter bootstrap. Does anyone have already done this ? This may be an old post but I just wanted to add how I got things set up. It seems to be easier than how codea did it above. 1) In your view, simply create your table like normal (with a @foreach or some such thing) and give it an ID of jqueryTable . Then download the following 3 files and put them in the ~/Scripts/ and the ~/Content/ folders: dataTables.bootstrap.css jquery.dataTables.js dataTables.bootstrap.js Now add those files to your BundleConfig.cs file using the following

How to destroy first initialization of datatable (DataTable inside a modal)

♀尐吖头ヾ 提交于 2019-12-01 07:30:07
问题 I have a modal that displays a table. And I use datatable plugin so that the data is searchable and sortable. It works properly at first but when I close the modal and click other link to the same modal, it displays error. I have found solution to destroy the DataTable and I put the destroy() before the initialization of the datatable but then no data is displayed inside the table.. if I put it after the initialization it gave me the initialization error the second time I click the button.

Data table specific column filter with multi select drop down

断了今生、忘了曾经 提交于 2019-12-01 03:43:46
问题 I have seen this possibility in the Datatable API for the specific column filtering with Drop down. Ref: https://datatables.net/examples/api/multi_filter_select.html But for me, its different, I need to do the same with multi-select drop down. So the datatable should show the results accordingly. So as in the above link, I can not able to select two offices "Tokyo and London". I had implemented the coding with multi-select plugin (http://harvesthq.github.io/chosen/) but the datatable takes

How to get value entered in search box In Datatables

核能气质少年 提交于 2019-11-30 14:39:14
问题 How to get value entered in search box In Datatables. Is there a way to get value entered in search box in Data Tables? 回答1: If you just want to check the value when a search is performed [dataTables 1.10.x ] : var table = $('#example').DataTable(); $('#example').on('search.dt', function() { var value = $('.dataTables_filter input').val(); console.log(value); // <-- the value }); if you want to check the value before the search, and be able to cancel the search, you must unbind the default

datatables create filter checkbox

大城市里の小女人 提交于 2019-11-30 14:14:18
Does anyone have examples on how to create a Datatablest filter checkbox? I want to display only rows that have a value above X or below Y being controlled by a checkbox. You would have to write your own custom filtering function but after that the code would be vary simple $(document).ready(function() { $.fn.dataTableExt.afnFiltering.push(function(oSettings, aData, iDataIndex) { var checked = $('#checkbox').is(':checked'); if (checked && aData[4] > 1.5) { return true; } if (!checked && aData[4] <= 1.5) { return true; } return false; }); var oTable = $('#example').dataTable(); $('#checkbox')

auto print using jquery

那年仲夏 提交于 2019-11-30 14:04:59
问题 I have the data in the following format: (Dummy Entries)(id=posGridView) As I process the sale, a small receipt print automatically with selected columns, not all the columns. Because all data is available in this grid view, How can I print it dynamically with any format with jquery? Edited Actually I want to print in this format dynamically from the above grid view 回答1: Printing There's no need for jQuery for printing a page, you just need the JavaScript function: window.print(); . If you

How to add multiple rows in datatables jquery

痞子三分冷 提交于 2019-11-30 11:51:01
I have used https://datatables.net/reference/api/rows.add%28%29 link working but the data showing the table as [object,object] . How to show the object to string. i have used JSON.stringify(obj) its also not working. HTML <table id="exampleTable"> <thead> <tr> <th>Year</th> <th>Month</th> <th>Savings</th> </tr> </thead> <tbody> <tr> <td>2012</td> <td>January</td> <td>$100</td> </tr> <tr> <td>2012</td> <td>February</td> <td>$80</td> </tr> </table> JS $('#addRows').click(); var table3 = $('#exampleTable').DataTable(); $('#addRows').on( 'click', function () { table3.row.add( [ { "Year": "Tiger

Library For JQuery DataTables ASP.NET MVC

喜夏-厌秋 提交于 2019-11-30 10:37:05
i want to use jQuery DataTables in my ASP.NET MVC 5 Project. I did actually used the datatable and its working perfectly fine, but problem is i had to manually set the filter and queries, and i have a feeling the way i am trying to implement the datatables in mvc is not quite right. Yes i do get the results but i want to follow and standards plus i want something that i do not have to type the filter and pagination code again and again, i only send parameters to some function or class and i get the result. This is why i am trying to look for some datatables library with proper documentation.

jQuery DataTables - Accent-Insensitive Alphabetization and Searching

旧城冷巷雨未停 提交于 2019-11-30 08:05:11
问题 When using jQuery DataTables is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden column but that wouldn't solve the alphabetizing issue. EDIT I tried the following: $.fn.dataTableExt.ofnSearch = function ( data ) { return ! data ? '' : typeof data === 'string' ? data .replace( /\n/g,