Search
14013 results 3221-3230
Forum
- 28th Mar 2015Combine DOM & AJAX datatables source - server side false - filter / search implicationsHi, I'm currently loading datatables with an ajax source with anything between 100 - ~ 10,000 rows returned as a basic json response. JSON is returned in a very basic format and I make use of "render" to display the response accordingly in a user friendly manner and for filtering/searching I use the raw JSON data. For usability, i'd like datatables to load, say the first 5 records from DOM and the remainder from the datatables ajax request. The first 5 DOM elements will be outputted to the page already in the user friendly display (I guess you could call this the same as my "render" format ....). I have been reading about Defer Loading function, however, this looks to be Server side only, which mine is not. Even if I could use this function. How would you integrate the first 5 elements whilst ensuring they could be included and contain the necessary data for filtering/searching etc? I have complete control over how the first 5 are outputted to the page so I was originally thinking of making use of html 5 data attributes for the filter data but am at a complete loss as to how this would work with datatables..... Really appreciate if you could help on this one - please let me know if I need to provide more info. Thanks.
- 10th Dec 2014Datatables 1.10 search() with serverSide on off argumentHi, Is there a way to use http://datatables.net/reference/api/search() function so that even if serverside is true, it should just with data that tbale has at the moment. I think there should be option serverside(true/false)|optional .search(input,regex,smart,caseInsen,serverside(true/false)|optional)
- 14th Oct 2014Show x entries and search on separate linesWhatever I do, I cannot see why this is happening HTML: http://pastebin.com/2GJ9yuhm Screenshot: http://i.imgur.com/IKSGNhN.png Debug url: http://debug.datatables.net/awajup
- 2nd Sep 2014Multiple lines per row but search as oneHi, I have a situation where I need to show two or more rows as a unit of data. For example, I might want to show two products that can go together to make a unit. Suppose I was looking for things that could be made into a sandwich. My results might show: FoodCaloriesPrice 1.Bread2000.25 Peanut Butter1500.10 2.Bread2000.25 Peanut Butter1500.10 Jelly750.10 3.Bread2000.25 Roast Beef2501.00 OK, here's the challenge. I need to be able to filter and sort them by: a) All combinations containing an ingredient. b) Total calories. c) Total cost. I was thinking that I could use a nested table for this with some hidden columns that have the totals and other information (like a comma delimited list of the descriptions) and filter/sort on those. I was planning on using YADCF for the sorting. Any ideas if this is feasible? If my approach is wrong, is there another way to accomplish this with datatables and something like YADCF? Thanks
- 22nd Aug 2014in datatable after search how to get back to normal statei searched using custom code id(table..column().search().draw()) it 's working fine but how to get back to normal state
- 13th Jul 2014Search data faster big tableHi, i have an application with datatables. In a specific table there are around 500.000 records, it runs perfect. Table load in 1-2 seconds. Table has individual column filter, when i look for a record it takes around 15-20 seconds and i want to reduce this time because table will be bigger...someone knows if is there any way to look for data faster? i have thought delete individual column filter and insert a form with a select boxes with value of the columns and a text box to insert data that we need look and send this data serversideprocessing.php but o dont know if is possible? someone have made this? it reduces time to swow data? Thnaks
- 17th Jun 2014Why search and sort not working in text and dropdown field?In my page I have text boxes and dropdown lists, like shown in below link. http://datatables.net/examples/api/form.html I want sorting and searching to be work on these fields also. How should I do this?
- 15th Jun 2014Search text highlighting (disable "non-searchable" columns)Hi! I'm using the Highlight plugin from: https://datatables.net/forums/discussion/2123/filter-post-processing-and-highlighting/p2 and it works fine. However it ignores if columns are set to searchable: false. Is there any way to disable the highlight on those columns? I added a fiddle: http://jsfiddle.net/3UZZW/ If you type in 13 you'll see that the date in the left column gets highlighted, too
- 6th Jun 2014Knockout Data Clearing on Sort or SearchI am having an issue with the DataTables plugin an KnockoutJS. When I populate the table with Knockout bindings the DataTable comes up perfectly. When you click sort or page it clears the tables and displays 'No data available in table'. Below is the knockout bindings I am using. Here is the actual data and the classes that we are using with the table bindings. ViewModel = jQuery.parseJSON( "{"orders":[{"OrderID":11111111,"OrderStatusID":7,"OrderDate":"/Date(1401721692707)/","FirstName":"Evolv","LastName":"Master Distributor 4","Company":"","SubTotal":72,"ShippingTotal":9.75,"TaxTotal":"","Total":81.75,"CurrencyCode":"usd","WeightTotal":1.2,"BusinessVolumeTotal":40,"CommissionableVolumeTotal":60,"TrackingNumber1":"","TrackingNumber2":"","TrackingNumber3":"","TrackingNumber4":"","TrackingNumber5":"","ShippedDate":"/Date(-62135575200000)/"},{"OrderID":11111122,"OrderStatusID":7,"OrderDate":"/Date(1398288995000)/","FirstName":"Evolv","LastName":"Master Distributor 4","Company":"","SubTotal":10,"ShippingTotal":"","TaxTotal":"","Total":10,"CurrencyCode":"usd","WeightTotal":0.5,"BusinessVolumeTotal":"","CommissionableVolumeTotal":"","TrackingNumber1":"","TrackingNumber2":"","TrackingNumber3":"","TrackingNumber4":"","TrackingNumber5":"","ShippedDate":"/Date(-62135575200000)/"},{"OrderID":11111123,"OrderStatusID":7,"OrderDate":"/Date(1398288835000)/","FirstName":"Evolv","LastName":"Master Distributor 4","Company":"","SubTotal":10,"ShippingTotal":"","TaxTotal":"","Total":10,"CurrencyCode":"usd","WeightTotal":0.5,"BusinessVolumeTotal":"","CommissionableVolumeTotal":"","TrackingNumber1":"","TrackingNumber2":"","TrackingNumber3":"","TrackingNumber4":"","TrackingNumber5":"","ShippedDate":"/Date(-62135575200000)/"}]}"); EvolvCart.OrderHistory = function (OrderHistory) { var self = this; self.OrderID = ko.observable(OrderHistory.OrderID || ''); self.OrderStatusID = ko.observable(OrderHistory.OrderStatusID || ''); self.OrderDate = ko.observable(OrderHistory.OrderDate || ''); self.FirstName = ko.observable(OrderHistory.FirstName || ''); self.LastName = ko.observable(OrderHistory.LastName || ''); self.Company = ko.observable(OrderHistory.Company || ''); self.SubTotal = ko.observable(OrderHistory.SubTotal || ''); self.ShippingTotal = ko.observable(OrderHistory.ShippingTotal || ''); self.TaxTotal = ko.observable(OrderHistory.TaxTotal || ''); self.Total = ko.observable(OrderHistory.Total || ''); self.CurrencyCode = ko.observable(OrderHistory.CurrencyCode || ''); self.WeightTotal = ko.observable(OrderHistory.WeightTotal || ''); self.BusinessVolumeTotal = ko.observable(OrderHistory.BusinessVolumeTotal || ''); self.CommissionableVolumeTotal = ko.observable(OrderHistory.CommissionableVolumeTotal || ''); self.TrackingNumber1 = ko.observable(OrderHistory.TrackingNumber1 || ''); self.TrackingNumber2 = ko.observable(OrderHistory.TrackingNumber2 || ''); self.TrackingNumber3 = ko.observable(OrderHistory.TrackingNumber3 || ''); self.TrackingNumber4 = ko.observable(OrderHistory.TrackingNumber4 || ''); self.TrackingNumber5 = ko.observable(OrderHistory.TrackingNumber5 || ''); self.ShippedDate = ko.observable(OrderHistory.ShippedDate || ''); } EvolvCart.OrderHistoryClass = function () { var self = this; self.orders = ko.observableArray(); } EvolvCart.orderHistoryViewModel = new EvolvCart.OrderHistoryClass(); Order ID First Name Last Name Order Date Total
- 21st Nov 2013error with search box, but everything else works - pdo styleI am using server-side php to grab data from my database in pdo style using the script found here - https://gist.github.com/jjb3rd/3156545 Searching is not working for me and not sure why... everything else is working fine. Any ideas? DataTables warning (table id = 'sample_1'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error. Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number' in /home/test/public_html/assets/data-tables/test-pdo.php:99 Stack trace: #0 /home/test/public_html/assets/data-tables/test-pdo.php(99): PDOStatement->execute() #1 /home/test/public_html/assets/data-tables/test-pdo.php(143): TableData->get('accounts', 'account_id', Array) #2 {main} thrown in /home/test/public_html/assets/data-tables/test-pdo.php on line 99 line 99 is - $statement->execute(); from Bind Parameters Aside from this issue... how the heck do I only return specific rows from the database? In my situation nearly every instance where I use datatables I do not want to return all rows in the table because I will need to use something like WHERE user=user or WHERE id=id so only specific data is returned and allowed to be sorted.