Search
18879 results 571-580
Forum
- 20th Jun 2019how can i create 2 dynamic datatableshow can i deselect page 2 by this current page is 1.
- 20th Mar 2019How to create data table using this Jsonokay i understood
- 20th Mar 2019How to create data table using this Json to take SourceAsMap name,age and dateThe correct solution is: we made a slight change and we got a data Table Thank you!!! :) var $table = $('#example').DataTable({ 'ajax': { "type": "POST", "url": "http://localhost/ajax/thi/min.json", "dataType": 'json', "dataSrc": function (json) { console.log(json.data[0].hits.hits); var response_data1 = []; for (var i = 0; i < json.data[0].hits.hits.length; i++) { response_data1.push({ 'Name': json.data[0].hits.hits[i].sourceAsMap.name, 'Age': json.data[0].hits.hits[i].sourceAsMap.age, 'Date': json.data[0].hits.hits[i].sourceAsMap.date }) } console.log(response_data1); return response_data1; } }, "columns": [{ "data": "Name" }, { "data": "Age" }, { "data": "Date" } ] });
- 15th Mar 2019Can we create DataTable as a react Component?If so, Is it worth if we create DataTable as component?Hi @"Goutham.kn" , A quick search found this Medium page here . Hope that helps, Cheers, Colin
- 11th Mar 2019Editor returned json on create does not include dataI'm not clear why the row id for the newly created row wouldn't be returned at the moment if you are using the PHP libraries for Editor? Could you elaborate on that for me? Thanks, Allan
- 7th Jan 2019datatables create filter checkboxthe advantage of mine was that it had the creation of dynamic checkboxes and considering my use, I need them.
- 20th Dec 2018How To Create Space Between Search Box & Table?Hi @nordike , This thread here may be interesting, it shows how to move table elements to other locations. The other option is to do something in the CSS, like this here. Cheers, Colin
- 21st Nov 2018Create test case for editorI wanted to use the example with jQueryUI I will try to use this one and add jQueryUI in it Thanks
- 9th Oct 2018How do I create a link for a previous search?Hi @ancredigital , This blog post here should get you started - there's some examples on that page. Cheers, Colin
- 19th Sep 2018How can I create Expand/Collapse Row button in TypeScript/Angular 6?I saw that tutorial but I integrated it differently in Typescript. <div class="container"> <h1>Clients</h1> <h3>Compliance Report</h3> <table class="table table-hover" cellspacing="0"> <thead> <tr> <th></th> <th>Client - Member</th> <th>Fund Name</th> <th>Issuer</th> <th>Holding</th> </tr> </thead> <tbody> <tr *ngFor="let client of clients"> <td class="details-control" id="detail-btn" (click)="changeDetail()" orderable="false"></td> <td>{{client.firstName}}</td> <td>{{client.lastName}}</td> <td>{{client.company}}</td> <td><input type="checkbox"></td> </tr> </tbody> </table> </div> If I already have my columns built how can I dynamically edit the first one to have the same properties as the first column given in the example? $(document).ready(function() { var table = $('#example').DataTable( { "ajax": "../ajax/data/objects.txt", "columns": [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { "data": "name" }, { "data": "position" }, { "data": "office" }, { "data": "salary" } ], "order": [[1, 'asc']] } ); If you were wondering, here is my full implementation. ngOnInit() { this.http.get('https://5a5a9e00bc6e340012a03796.mockapi.io/clients') .subscribe((data: any[]) => { this.clients = data; this.chRef.detectChanges(); // Now you can use jQuery DataTables : const table: any = $('table'); this.dt = table.DataTable({ }); }); } format () { // `d` is the original data object for the row return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">' + '<tr>' + '<td>Full name:</td>' + '<td>Details row!</td>' + '</tr>' + '</table>'; } changeDetail () { const tr = $('#detail-btn'); const row = this.dt.row( tr ); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row row.child( this.format()); tr.addClass('shown'); } } }