DataTables logo DataTables

via Ad Packs
How sort a column after fnRender func ?
  • pakypaky
    Posts: 104
    Hi my server-side table it's all ok, only one problem sort feature, only on my first coumn sort works, on other move the rows but with no sense sort order !!!
    How can I solve it ?
    thanks ;)
  • pakypaky
    Posts: 104
    strange ... for order my third column, I must click on sixth column.... help me!! :)

    After debug table, in "Full column detail" I read this:
    {
        "aDataSort": [3],
        "asSorting": ["asc", "desc"],
        "bSearchable": true,
        "bSortable": true,
        "bUseRendered": true,
        "bVisible": true,
        "_bAutoType": true,
        "fnCreatedCell": null,
        "fnGetData": "function (b) {
        return b[a];
    }",
        "fnRender": "function (o, val) {
        return getFisioterapista(o.aData[8], o.aData[9]);
    }",
        "fnSetData": "function (b, d) {
        b[a] = d;
    }",
        "mDataProp": 3,
        "nTh": "<th aria-label=\"
                       
                           
                           
                      TDR
                  : activate to sort column ascending\" style=\"width: 120px;\" colspan=\"1\" rowspan=\"1\" aria-controls=\"DataTables_Table_0\" tabindex=\"0\" role=\"columnheader\" class=\"sorting\" scope=\"col\">
                      <span class=\"column-sort\">
                          <a href=\"#\" title=\"Sort up\" class=\"sort-up\"></a>
                          <a href=\"#\" title=\"Sort down\" class=\"sort-down\"></a>
                      </span>TDR
                  </th>",
        "nTf": null,
        "sClass": "",
        "sContentPadding": "",
        "sDefaultContent": null,
        "sName": "",
        "sSortDataType": "std",
        "sSortingClass": "sorting",
        "sSortingClassJUI": "",
        "sTitle": "
                      <span class=\"column-sort\">
                          <a href=\"#\" title=\"Sort up\" class=\"sort-up\"></a>
                          <a href=\"#\" title=\"Sort down\" class=\"sort-down\"></a>
                      </span>TDR
                  ",
        "sType": "html",
        "sWidth": "120px",
        "sWidthOrig": "120px",
        "iDataSort": -1,
        "sCellType": "td",
        "aTargets": [3]
    }
    
  • allanallan
    Posts: 15,513
    That looks fairly sensible - I think we would need to see the working test case to help diagnose the problem.

    Allan
  • pakypaky
    Posts: 104
    Hi Allan, working test ? How can do it ? tnx
  • allanallan
    Posts: 15,513
    Just give me a link to the page :-)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.

In this Discussion