yadcf not sorting dropdown list properly - yadcf

I have tried every option I can think of in configuring both DataTables (capital D) and yadcf but cannot seem to get the select drop down list to list in case-insensitive order.
Setup:
var dTable=$('#bTable').DataTable({
"traditional": false,
"pageLength": 1000,
"jQueryUI": true,
"stateSave": true,
"stateDuration": 60 * 60 * 24,
"processing": true,
"stateLoadParams": function (settings, data) {
lastSearch=data.search.search;
},
"ordering": true,
"processing": true,
"paging": false,
"info": false,
"autoWidth": false,
})
yadcf.init(dTable,[
{column_number : 3, column_data_type: "text", filter_match_mode: "exact", sort_as: "alphaNum", filter_container_id: "hs_clu", filter_reset_button_text: false, style_class: "select-style", filter_default_label: "All"},
],
{ cumulative_filtering: true }
);
When I click on the column header the column data is sorted properly as:
nbmps01
nbmps02
nbmps800
Network-1
Network-2
Network-3
NTPROV
NTSYM
NTWKTRANS
NVAM-CXMT
My dropdown select list is in this order and doesn't seem to be proper:
NTPROV
NTSYM
NTWKTRANS
NVAM-CXMT
Network-1
Network-2
Network-3
nbmps01
nbmps02
nbmps800
I have am at my wits end on this after 2 days of fiddling with it. Does anyone out there have any ideas and are willing to share.
Any help is very much appreciated.

I have improved the alpha numeric sorting in yadcf 0.9.1.beta.5 , now it works as expected.
use sort_as: "alphaNum"
Here is a working jsfiddle link

Related

Replace Placeholder on text type

I'm wondering if it's possible to replace the placeholder text of an input..
yadcf.init(myTable, [
{column_number : 0, filter_type: "text", case_insensitive: true, filter_container_id: "pokedex-number-filter", filter_reset_button_text: false, style_class: "form-control"},
{column_number : 1, filter_type: "text", case_insensitive: true, filter_container_id: "pokemon-name-filter", filter_reset_button_text: false, style_class: "form-control"},
{column_number : 2, filter_type: "text", case_insensitive: true, filter_container_id: "pokemon-gen-filter", filter_reset_button_text: false, style_class: "form-control"},
]);
You can user the following
* setDefaults
Description: Set global defaults for all yadcf instances.
Arguments: Object consisting of anything defined under "Global Parameters"
Usage example: yadcf.setDefaults({'language': {'select': 'تحديد قيمة'}});
or you can set per single table, per column using the filter_default_label option
read more inside the yadcf js file

How to change text to value in data tables

Hi I am trying to export my values into excel but some of them are converting to text I don't know why I am passing integers but the exported excel file is converting them into integer. Is there any way to convert them into integer ?
table = $('#OriTable').dataTable({
responsive: false,
orderClasses: false,
aaData: json["data"],
deferRender: true,
stateSave: true,
bPaginate: false,
searching: false,
aaSorting: false,
dom: 'Bfrtip',
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5'
]
});
Thanks.
Update
Attached the image below:
https://i.stack.imgur.com/PnDYR.png
data examples:
[1, "Finca", 6.371, 2378167.48, 0.13]
[2, "Diner", 5.573, 75643343.6, 4.27]

Remove search box with bFilter still set to True in DataTable

I need to apply custom filtering function in my datatable. For this, I need to set "bFilter": true. But I don't need search box. How can I do that?
var holiday_filter = $('#holiday_table').DataTable({
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": false,
"bInfo": false,
"order": [[0, 'desc']],
//"aLengthMenu": [5, 10, 20, 30],
'iDisplayLength': 4,
"bAutoWidth": false
});
Use dom option (default value lfrtip) without f which represents filtering input.
For example:
var holiday_filter = $('#holiday_table').DataTable({
// ... skipped ...
'dom': 'lrtip'
});

How to format Data Table exported to pdf?

Please help me to add CSS to the export PDF using Data Table. The exported PDF is not formatted as the HTML table.I need to make td align right in exported pdf.Also how can I merge columns?
Thank you
Here is my code:
$('#reporTable').DataTable({
"paging" : false,
"ordering": false,
"info" : false,
"searching" : false,
dom: 'T<"clear">lfrtip',
tableTools: {
"sSwfPath": "/javascripts/js/dataTables/tools/swf/copy_csv_xls_pdf.swf",
"aButtons": [
{
"sExtends": "pdf",
"sTitle": $filename,
"sPdfOrientation": "landscape",
"sPdfMessage": $out_name+":" + msg
},
],
}
});
Use exportOptions of data table.
For details, please visit data table formatting
Follow this links for Customisation of the datatable buttons
https://datatables.net/extensions/buttons/examples/initialisation/className.html
https://datatables.net/extensions/buttons/examples/print/customisation.html

Check box "ticked" on page 1 is reflected in page 2 in EnhancedGrid

I have a enhancedgrid and used on two pages. When check box (component of data enhanced grid) is checked on page1, the equivalent row(s) on pg 2 are then ticked. My enhancedgrid code is
grid = new dojox.grid.EnhancedGrid({
loadingMessage:"Please wait",
store:newStore,
structure:layoutQL,
autoWidth:false,
autoHeight:true,
columnReordering:false,
rowsPerPage:3,
indirectSelection: true,
//noDataMessage:"No transactions have been processed for posting.",
//selectionMode:'single',
plugins: {
pagination: {
description: true,
sizeSwitch: false,
pageStepper: true,
gotoButton: true,
/*page step to be displayed*/
maxPageStep: 6,
/*position of the pagination bar*/
position: "bottom",
indirectSelection: true
},
filter : {
// Show the closeFilterbarButton at the filter bar
closeFilterbarButton: true,
// Set the maximum rule count to 5
ruleCount: 5,
// Set the name of the items
itemsName: "records"
}
}
I am using EnhancedDataGrid as in dojo framework. Any help will be appreciated.
Try "grid.selection.deselectAll()" when you move from one page to the next.