Search
18435 results 2731-2740
Forum
- 2nd Aug 2017Search is not working on Ajax table with HTML tagsThe search is bein send to the server, it is not workin on the client side. The problem is that for the rows that the data was added like this is not working: mRender": function ( data, type, row ) { return row.ID + '<br><span class="ft-red">' + row.NAME + "</span>"; }, For the columns that the data was added like this is working fine: mRender": "ID"
- 11th Jul 2017I am having trouble with PUT/DELETE URL in ajax callsSo here is the code that solved my problem. Using id in the URL string did exactly what I needed. remove: { type: 'DELETE', dataSrc: "data.vehicles", processData: false, //add _id_ to the end of the url url: apiPathProtected + "vehicle/_id_", beforeSend: function (request) { request.setRequestHeader("X-Access-Token", user.token); request.setRequestHeader("Content-Type", "application/json"); },
- 25th May 2017AJAX Search box queries twiceI fixed this by removing the default event handler and put on my own. http://live.datatables.net/cixegedi/1/edit $(document).ready( function () { $(document).on("preInit.dt", function(){ var fil = $("#example_filter input"); // remove default event hanlder fil.off(); // add one for key down fil.on("keydown", function(evtObj){ // whatch for the return key var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == 13){ $('#example').DataTable().search(this.value).draw(); } }); // watching for the return key is not obviouse for all my users so // I just used a regular button below for this but on my own work // I used a maginfying glass icon button. var btn = $("<button type='button'>Go</button>"); fil.after(btn); btn.on("click", function(){ $('#example').DataTable().search(fil.val()).draw(); }); }); var table = $('#example').DataTable( {} ); } );
- 18th May 2017Access to Index Columns from Ajax data feed and enabling/disabling columnsHi Bindrid, thanks for the enlightening example last posted, these two have been useful in me moving forward. I now have a class "editable" that I can selectively apply to the DataTable() what surprises me is that it seems to be such a complicated task to process the logic. Is there really no way, having selected cells that are editable and having added the class "editable" to the table that we can flag up to DataTables() which fields can be input? handling each cell event in such detail each and every cell thats entered seems a huge amount of coding for such a simple requirement. And adding an input ... why is that? as something that is so JQuery biased I am surprised that I can't just do something like $("#mytable").DataTables().editableClass("editable"); job done ! Can I apply any logic to the cells() collection to skip processing if the class is not set to editable? Something in a single line of code perhaps? jON
- 18th May 2017custom child row without AJAX, but no longer responsivehey , can you update the jsfiddle , i got the same problem , thanks for your help
- 7th Apr 2017Wait or loading message for large dataset (not ajax).https://datatables.net/reference/option/processing
- 6th Apr 2017Blog - Ajax loaded row details - questionOf course, i'm too busy copying and not thinking i will take the json object and use $.each to loop through the data and build a table or something like that. This would work great, but for an even better result, do you have any advice on how to incorporate a datatable into the div ?
- 7th Mar 2017Fetch records from database given limit Ajax data tableThe deferLoading option over works with serverSide which you are not using. Let's not have this same conversation in two different places. I'm going to close this thread in favour of your other one on this topic. Allan
- 6th Mar 20172 different dataTables from separate ajax callsUncaught TypeError: Cannot set property '_DT_CellIndex I've seen this mean that one of the Datatables init options is configured with a non-existent column. If you have four columns then they are columns 0-3. Kevin
- 22nd Feb 2017Ajax handler is not invoked in DataTablesHonestly, I have no idea! That's really a .NET question and you'd be better asking on Stack Overflow or similar as I'm no wizard as .NET stuff. Allan