Search
43826 results 7211-7220
Forum
- 10th Feb 2016Add a new row on a filtered table.I have a dataTable that, once it finishes loading on the page, it calls $.fn.dataTable.ext.search.push( function(settings, data, dataIndex) { return $(table.row(dataIndex).node()).attr('data-status') == 'P'; } ); to filter out to only rows with the data-status = P. Whenever I add a new row: var toAdd = [ 'cell 1', 'cell 2', 'cell 3', 'cell 4', 'cell 5', 'cell 6', 'cell 7', 'cell 8' ]; toAdd.id = someId; toAdd.status = 'P'; table.row.add(toAdd) table.draw(); Nothing pops up. The only way I can actually see the data pop up and filtered by pending is if I do the following: $.fn.dataTable.ext.search.pop(); table.draw(); and then manually use a dropdown to filter out pending results again. Is there anyway to add, and render with the filters still in place?
- 8th Feb 2016Data Table Export UTF-8 errortry it https://datatables.net/extensions/buttons/examples/html5/simple.html :)
- 3rd Feb 2016Is it possible to connect your Datatable to a view instead of a table?SORRY - I figured out a rather silly mistake on my own. Please delete/disregard
- 27th Jan 2016Show/hide table columns with rowspan or colspan dynamically?I'm referring this example: https://datatables.net/examples/api/show_hide.html Often you have tables with a colspan or rowspan. Is it possible to show/hide such columns? If not, take this as a feature request.
- 27th Jan 2016Get column id by clicking on the table footer cellHi, I'm trying to get the column index by clicking in the relative footer column title. The thing is that this is a fixed footer, hence the click event is triggered by the footer copy (the one used to keep the fixed position). $('.dataTables_scrollFoot').on('click', 'td', function () { var index = $(this).data('column-index'); console.log(index); }); Unfortunately, no data is available on the fixed footer. Do you have any suggestions to get the column index by clicking on a fixed footer? Cheers, Antonio
- 21st Jan 2016DataTable not working in mvc5 if used multiple table data in one tablePublic Works Department, Govt. of NCT of Delhi @if (Model.ReporttypeId == 1) {@Html.Raw("General Court Cases Report")} @if (Model.ReporttypeId == 2) {@Html.Raw("List of Court Cases")} @if (Model.ReporttypeId == 3) {@Html.Raw("List of Court Cases (Nature of Dispute wise)")} @if (Model.ReporttypeId == 4) {@Html.Raw("List of Court Cases (Court wise)")} @if (Model.ReporttypeId == 5) {@Html.Raw("List of Court Cases Report (Reply filed or not)")} @if (Model.ReporttypeId == 6) {@Html.Raw("List of Court Cases (Date of Next Hearing)")} S. No. Case Title (Click on Case Title for more info) @if (Model.ReporttypeId == 1) { Court Concerned Dispute Name Date of Next Hearing Remarks } @if (Model.ReporttypeId == 2 || Model.ReporttypeId == 3 || Model.ReporttypeId == 4 || Model.ReporttypeId == 5 || Model.ReporttypeId == 6) { Case No. if (Model.ReporttypeId != 3) { Court Concerned } Date of Next Hearing Nature of Dispute Present Position Advocate Name } @{var v = (from p in Model.CourtCaseReportList select new { OfficeName = p.OfficeName }).Distinct();} @foreach (var item in v) { @item.OfficeName foreach (var item1 in Model.CourtCaseReportList.Where(x => x.OfficeName == item.OfficeName).ToList().Distinct()) { @item1.SNo @item1.CaseTitle @if (Model.ReporttypeId == 1) { @item1.CourtName @item1.NatureDisputeName @item1.NextHearingDate @item1.SpecialRemark } @if (Model.ReporttypeId == 2 || Model.ReporttypeId == 3 || Model.ReporttypeId == 4 || Model.ReporttypeId == 5 || Model.ReporttypeId == 6) { @item1.CaseNo if (Model.ReporttypeId != 3) { @item1.CourtName } @item1.NextHearingDate @item1.NatureDisputeName @item1.PresentPosition @item1.AdvocateName } } } $(document).ready(function () { $('#mytable').dataTable(); });
- 19th Jan 2016I am trying to add button in the last column of the table. How can i do it?var oTable = $('#table').DataTable({ "bProcessing": true, "bServerSide": true, "bSearchable": true, "sAjaxSource": '', "sPaginationType": "full_numbers", "fnServerData": function (sSource, aoData, fnCallback) { $.ajax ({ 'dataType': 'json', 'type': 'POST', 'url': sSource, 'data': aoData, 'success': fnCallback }); }, "aoColumnDefs": [ { "mRender": function(data){ var id = data[0]; var btnEdit = '<a id="memberId" class="btn btn-primary"href="' + '' + '/' + id + '">' + '<i class="fa fa-edit"></i> Edit' + '</a>'; var btnDelete = '<a id="memberId" class="btn btn-danger"href="' + '' + '/' + id + '">' + '<i class="fa fa-delete"></i> Delete' + '</a>'; return btnEdit + ' ' + btnDelete; }, "sWidth": '15%' }] });
- 16th Jan 2016Jquery function is not working when show table from ajax request page$(function () { $("#example1").DataTable(); $('#example2').DataTable({ "paging": true, "lengthChange": true, "searching": true, "ordering": true, "info": true, "autoWidth": false }); });
- 11th Jan 2016Table Tool Buttons Not Working with angular2xls button and copy button return blank to Clipboard , although print is work also if i extend the xls button the click event not fire , of course i'm sure the swf is already loaded although when i extend text button it work fine "aButtons": [ { "sExtends": "text", "sButtonText": "New Record", "fnClick": function (nButton, oConfig, oFlash) { this.OpenFormForNew(); } }, { "sExtends": "xls", "sButtonText": "Excel", "mColumns": [0, 1, 2], "fnClick": function ( nButton, oConfig, oFlash ) { alert("test") console.log(oConfig); } }, "copy", // "csv", // "xls", "print" ], thanks in advance .
- 11th Jan 2016How Search Record to find data from table?I am using jquery.dataTables but i am not able to how to use it can any one post it with code or example.