Monday, 26 August 2013

jquery : add option value in array object

jquery : add option value in array object

i using jquery datatables , i have 2x table with aoColumns option and 1x
without aoColumns
so i want do the following
if(aoColumns != false)
add option in array
i tried that but it didnt work
function
Data_Table_Function(file,Language,ServerParams,Row_Call_Back,pagation,columns_sort,aoColumnDefs){
var Options_Data_Table = {};
Options_Data_Table = {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": file,
"sPaginationType": "full_numbers",
"bPaginate": true,
"oLanguage": Language,
"iDisplayLength": 25,
"aLengthMenu": [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "Çáßá"]
],
"fnServerParams": ServerParams,
"aaSorting": [[ 0, "desc" ]],
"fnRowCallback": Row_Call_Back,
"fnDrawCallback": pagation,
"bInfo": false,
"aoColumnDefs":aoColumnDefs
};
if(columns_sort)
Options_Data_Table.push("aoColumns" : columns_sort);
return Options_Data_Table;
}

No comments:

Post a Comment