Search
11152 results 1261-1270
Forum
- 6th Nov 2009Why does my Table sort those Numbers in a wrong order?Hi proair, The two numbers you have in those cells certainly look correct and should be identified as numbers by DataTables. Is accurate for all rows in your table (i.e. no empty values, no while space, no commas in larger numbers for formatting etc)? Thanks, Allan
- 22nd Aug 2009Date sort with sType html not completely working.in a custom date sorting function (and auto-detection if
- 7th Feb 2023Sort Order indicators styled like in 1.11Hi, for anyone trying to restore the old look here is my attempt: table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:after, table.dataTable thead > tr > td.sorting:before, table.dataTable thead > tr > td.sorting:after, table.dataTable thead > tr > td.sorting_asc:before, table.dataTable thead > tr > td.sorting_asc:after, table.dataTable thead > tr > td.sorting_desc:before, table.dataTable thead > tr > td.sorting_desc:after, table.dataTable thead > tr > td.sorting_asc_disabled:before, table.dataTable thead > tr > td.sorting_asc_disabled:after, table.dataTable thead > tr > td.sorting_desc_disabled:before, table.dataTable thead > tr > td.sorting_desc_disabled:after { top: 0.5em; bottom: 0.5em; opacity: 0.3; line-height: 1.5em; font-size: 1em; } table.dataTable thead > tr > th.sorting:before, table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:before, table.dataTable thead > tr > th.sorting_asc_disabled:before, table.dataTable thead > tr > th.sorting_desc_disabled:before, table.dataTable thead > tr > td.sorting:before, table.dataTable thead > tr > td.sorting_asc:before, table.dataTable thead > tr > td.sorting_desc:before, table.dataTable thead > tr > td.sorting_asc_disabled:before, table.dataTable thead > tr > td.sorting_desc_disabled:before { right: 1em; content: "\2191"; } table.dataTable thead > tr > th.sorting:after, table.dataTable thead > tr > th.sorting_asc:after, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > th.sorting_asc_disabled:after, table.dataTable thead > tr > th.sorting_desc_disabled:after, table.dataTable thead > tr > td.sorting:after, table.dataTable thead > tr > td.sorting_asc:after, table.dataTable thead > tr > td.sorting_desc:after, table.dataTable thead > tr > td.sorting_asc_disabled:after, table.dataTable thead > tr > td.sorting_desc_disabled:after { right: 0.5em; content: "\2193"; } table.dataTable thead > tr > th.sorting_asc:before, table.dataTable thead > tr > th.sorting_desc:after, table.dataTable thead > tr > td.sorting_asc:before, table.dataTable thead > tr > td.sorting_desc:after { opacity: 1; }
- 21st Nov 2017Is there a way to sort a column having both text box and label in rows?Like we have a column amount but in row 1 it is input field and in row 2 it is label. Is it possible tosort such a data?
- 12th Sep 2017DataTables With FontAwesome and Bootstrap 4 Integrations - Bug On Sort Icons?the old Bootstrap 4 sorting icon shows alongside the
- 21st Aug 2017orderFixed post reorder icon update failing to correctly show sort direction[Attempted to post this in bug forum but appear to have failed] No one appears to be able to tell me of a solution that I've missed in the following link so I assume it's actually a bug. https://datatables.net/forums/discussion/44097/orderfixed-post-reorder-failing-to-update-class#latest When using post orderFixed: orderFixed: { post: [1,'asc'] } When you then reorder that column (on click), it fails to show that the order has been changed to desc. So in the following example: http://live.datatables.net/xigadiqi/1/edit Pressing the "position" column shows the arrow for order direction as asc, despite the data being in desc order.
- 14th Apr 2017Can not sort column bcoz of using joins on two table and i am using server side processing c#select @i:=@i+1 AS RowNum,A.ReceiptNo as ReceiptNo,DATE_FORMAT(A.ReceiptDate,'%d-%m-%y') as ReceiptDate,G.Name as Guest,R.Name as Room,A.Amount from advancereceipt A LEFT JOIN guestmaster G ON A.Guest = G.Code LEFT JOIN roommaster R ON A.Room = R.Code, (SELECT @i:=0) AS foo where (Search IS NULL Or A.ReceiptNo like CONCAT('%' , Search , '%') Or DATE_FORMAT(A.ReceiptDate,'%d-%m-%y') like CONCAT('%' , Search , '%') Or G.Name like CONCAT('%' , Search , '%') Or R.Name like CONCAT('%' , Search , '%') Or A.Amount like CONCAT('%' , Search , '%')) order by case when SortDir <> 'ASC' then '' when SortCol = '1' then A.ReceiptNo end ASC, case when SortDir <> 'DESC' then '' when SortCol = '1' then A.ReceiptNo end DESC, case when SortDir <> 'ASC' then '' when SortCol = '2' then A.ReceiptDate end ASC, case when SortDir <> 'DESC' then '' when SortCol = '2' then A.ReceiptDate end DESC, case when SortDir <> 'ASC' then '' when SortCol = '3' then G.Name end ASC, case when SortDir <> 'DESC' then '' when SortCol = '3' then G.Name end DESC, case when SortDir <> 'ASC' then '' when SortCol = '4' then R.Name end ASC, case when SortDir <> 'DESC' then '' when SortCol = '4' then R.Name end DESC , case when SortDir <> 'ASC' then 0 when SortCol = '5' then A.Amount end ASC, case when SortDir <> 'DESC' then 0 when SortCol = '5' then A.Amount end DESC );
- 25th Mar 2017How to sort nested JSON object and display using handlebars?I have an AJAX request whose response is a nested object. Post some condition check, I display the data in a table using handlebars. So right now my request looks like this: $.ajax({ async: false, url: serverAPI + '/<some_path>/' + ID, success: function(data) { $.each(data.details, function(index, element) { if (element.detailStatus != 'Removed') { element._id = dummyId element._field = field var html = templateTemp(element) placeholderTemp.append(html) } }); }, error: function(err) { console.log(err); } }); Now new requirement is to make the columns sortable. How to use DataTables in this scenario? How to do my if condition check within datatable? Where does handlebars append go? How to handle ajax error? Do I need to rewrite this ajax request within Datatable plugin or there is a work around? Sorry, first time with datatables, hence such questions!! Thanks in advance!
- 6th Mar 2017Problem - Pagination, Sort and Filter not displayeduse filter, pagination and sorting capabilities of datables I
- 27th Feb 2017some help with column sort with checkboxhello, I am having a problem with reordering a column with checkboxes, and I am looking for some pointers at where to look in my code. what I do is in this jsfiddle (which works!) https://jsfiddle.net/prtome/c48jmu75/6/ but when i do the same thing in my code, the first column with checkboxes does not reorder. You can see in the fiddle (a commented) alert. The same in my code give the same results, so the function is correctly called. I must have something else that disturb. The main difference is that I have colReorder (I could not make it work on the fiddle) and a colvis button (that again does not show in the fiddle). And of course the whole code has some more lines ;) When I take them out of my code nothing changes If anybody has seen something similar once and could give me some hints at what I should be controlling/looking at , I will be very grateful. Thanks a lot