     if (col = dataObj.name.match(search_regexp)) and dataObj.value
       searchcolumns.push(columns[col[1]]);
 
+    search_regexp = ///iSortCol_([0-9]+)///
+    if (col = dataObj.name.match(search_regexp))
+      sortcolumns[parseInt(col[1])]=columns[parseInt(dataObj.value)];
+
+    search_regexp = ///sSortDir_([0-9]+)///
+    if (col = dataObj.name.match(search_regexp)) and dataObj.value
+      sortcolumns[col[1]]=sortcolumns[col[1]]+"."+dataObj.value;
+
   );
 
   data.push({name: "sEcho", value: sEcho});
   data.push({name: "page", value: iDisplayStart/iDisplayLength + 1});
   data.push({name: "per_page", value: iDisplayLength});
-  data.push({name: "search[meta_sort]", value: columns[iSortCol]+"."+sSortDir});
+  data.push({name: "search[meta_sort]", value: sortcolumns[0]});
 
   $.each(columns, (index, val) -> 
     data.push({name: "columns["+index+"]", value: val});

      when "iDisplayLength"
        iDisplayLength = dataObj.value;
      when "iSortCol_0"
        iSortCol = dataObj.value;
      when "sSortDir_0"
        sSortDir = dataObj.value;
  );
      
  $.each(aoData, (index, dataObj) -> 
    search_regexp = ///sSearch_([0-9]+)///
    if (col = dataObj.name.match(search_regexp)) and dataObj.value

      
  columns = [];
  searchcolumns = [];
  sortcolumns = [];
  sortdirs = [];
  
  sEcho = 1;
  sSearch = "";
  bRegex = false;
  iDisplayStart = 0;
  iDisplayLength = 0;
  data = [];

  $.each(aoData, (index, dataObj) -> 
    switch dataObj.name
      when "sColumns"
