Sorting problem with > 28 columns

Sorting problem with > 28 columns

dstoosdstoos Posts: 4Questions: 0Answers: 0
edited February 2011 in General
I may just be missing something simple, everything works great until I add the 29th column. I can still filter and paginate without issue, the sorting just stops functioning. I did not make any changes to the ordering section of the php script. If anyone has run into this in the past, or if I missed it in my search on sorting in the forum and could post a link it would be much appreciated!

I only have 6 visible columns, but I wanted to pass all of them across for some ajax forms. Setting everything but the 6 to "bSorted": false didn't make a difference either.

jquery-1.5 / dataTables 1.7.5

Replies

  • dstoosdstoos Posts: 4Questions: 0Answers: 0
    [code]
    oTable = $('#table').dataTable( {
    "bJQueryUI": true,
    "bProcessing": true,
    "bServerSide": true,
    "iDisplayLength": 50,
    "aLengthMenu": [[50, 100, 150, -1], [50, 100, 150, "All"]],
    "sPaginationType": "full_numbers",
    "aaSorting": [[ 5, "desc" ]],
    "aoColumns": [
    /* pkey */ { "bVisible": false },
    /* version */ { "bVisible": false },
    /* sysdate */ { "bVisible": false },
    /* brief */ null,
    /* prepared */ { "bVisible": false },
    /* startdate */ null,
    /* starttime */ null,
    /* endtime */ null,
    /* primarycontact */ null,
    /* pphone */ { "bVisible": false },
    /* pemail */ { "bVisible": false },
    /* secondary */ { "bVisible": false },
    /* sphone */ { "bVisible": false },
    /* semail */ { "bVisible": false },
    /* vendor */ { "bVisible": false },
    /* vphone */ { "bVisible": false },
    /* vemail */ { "bVisible": false },
    /* status */ null,
    /* approved */ { "bVisible": false },
    /* engapproved */ { "bVisible": false },
    /* appdate */ { "bVisible": false },
    /* emergency */ { "bVisible": false },
    /* intended */ { "bVisible": false },
    /* effect */ { "bVisible": false },
    /* statement */ { "bVisible": false },
    /* estimate */ { "bVisible": false },
    /* risk */ { "bVisible": false },
    /* procedurefield */ { "bVisible": false }
    /* verification */ { "bVisible": false }
    ],
    "sAjaxSource": "php/table.php"
    });
    [/code]
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    There isn't any kind of software limit imposed by DataTables, so I'm not 100% sure what is going on. Are you able to give us a link to an example that is setting this issue?

    Thanks,
    Allan
  • dstoosdstoos Posts: 4Questions: 0Answers: 0
    I dumped a copy on an external box to link here and it works fine =). Looks like it is an issue with the mysql account I'm using on the work box. Sorry to have wasted your time, switched from jqgrid to datatables the other day and I have to say as far as grid plugins go this one rocks!
  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    Thanks for the kind words :-)

    One possibility that springs to mind is the size of the GET URL. By default DataTables uses HTTP GET for the Ajax request for data (this can be overridden with fnServerData) - and servers are configured with a maximum URL request length. It could be that the first server was just at the limit with 28 columns, and 29 pushed it over the end - while the second server is configured slightly differently. A look at the server error log would confirm if this is the case. If it is an issue, using POST would fix it.

    Allan
  • dstoosdstoos Posts: 4Questions: 0Answers: 0
    Exactly what it was, LimitRequestLine bumped in Apache and it works fine. I switched it to POST anyways, thanks for the help!
This discussion has been closed.