Search
19011 results 631-640
Forum
- 8th Jun 2016How to create a Datatable that is 100% the height of its container?Fantastic ... thank you Allan.
- 16th May 2016Create and deleting multiple dataTable tablesis there a way to destroy/empty all of the old tables with a wildcard? You can use jQuery selectors to select multiple tables (just comma separate them, like you do in CSS). Or use the $.fn.dataTable.tables() method to get the existing DataTables in a single API instance. Allan
- 29th Apr 2016Create Hyperlink column to trigger AJAX load with new URL parameterAdding the following columnDef and defining a function to recreate the table with a new data property for the ajax option worked. "columnDefs": [{ "targets": [4], "mData": null, "mRender": function(data, type, full) { return '<a href="" onclick="event.preventDefault(); searchSponsor(' + data[15] + ');">' + data[6] + '</a>'; }]
- 10th Nov 2015How do I create child row in datatable when getting data from SharePoint REST API call?Sorry msb72, I can't help you but I'm just at the stage of seeing if it is possible to bring in data into my personal GoDaddy page from my O365 site. Were you able to perform this with a REST call? Tx
- 30th Oct 2015How to use Restful API when the datatable expects more data than was sent in with the create?Good to hear you got it working! Allan
- 21st Oct 2015How to create custom filter buttonsWhat you would probably need to do is send some extra information to the server to tell it that it should ignore a specific condition - the ajax.url() method for example could be used to set a GET parameter on the URL. The PHP script would then check for that if ( ! isset( $_GET['...'] ) ) { $editor->where( ... ); } etc. Allan
- 6th Oct 2015If WP custom field contains a value create a hyperlinked entry, else make it plain text.ThomD, thanks very much for the suggestions. Looking back. I think my question wasn't clear enough. I have a JSON file, which is supplying the tabular data via an AJAX request. The variable I'd like to compare is a WordPress PHP variable ('food-status') that is not present in my JSON file. I'd consider manually adding them, but its a list that has 18,000+ entries, and I don't know a good way to automate it. If I tried to call a function from within the DataTables script, wouldn't my PHP var be outside the DataTable's scope?
- 8th Sep 2015How can I create a link using the data source in Datatables Row Grouping?Hello everyone, In case someone else encounters this problem here is the solution that someone managed to come up with: api.rows({page:'current'} ).data().each( function ( data, i ) { var group = data[0]; var groupLink = '<a href="' + data[3] + '">' + $('<div>').text(group).html() + '</a>'; if ( last !== group ) { $(rows).eq( i ).before( '<tr class="group"><td colspan="5">'+group+'</td></tr>' ); last = group; } }); And the link: https://stackoverflow.com/questions/32445714/how-can-i-create-a-link-using-the-data-source-in-datatables-row-grouping
- 24th Jul 2015Avoid that dependent() is fired on form createHi, I missed your thread before - sorry about that! Yes, this is expected behaviour as the value is changed at that point - more specifically it will set the field's value to be the default value (usually an empty string). Part of the reason for this is if you have been editing a field previously then the value it holds would be that old value and you want it to be replaced with the default value. If you really don't want the event to occur, you would need to attach attach and remove the listener every time the form is opened and closed - although I think that could lead to unexpected behaviour. Allan
- 16th Jul 2015Let the editor create the form based on AjaxThanks, that should do it :D