Just a little more server-side processing control over the rows generated by dataTables

Just a little more server-side processing control over the rows generated by dataTables

assimilaterassimilater Posts: 3Questions: 0Answers: 0
edited October 2013 in Feature requests
You have documented the option to respond with a DT_RowId or DT_RowClass object but it would be good, and simple, to include things like DT_RowAttr and DT_RowData.

I can potentially see arguments against creating a way to modify attr directly to help ensure best practices as sometimes new web developers will abuse that, but in my case It's really the data-* attribute I'm after which could also be modified with jQuery's $.fn.data() method. The applications for this would be far and wide, in my case I need it because I'm trying to make my table interactive with other parts of the page, including a rendered google maps plugin.

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    The good news is that `DT_RowData` as already been added in 1.10: https://github.com/DataTables/DataTables/blob/1_10_wip/media/js/jquery.dataTables.js#L1434 .

    Interesting idea about `DT_RowAttr` - I hadn't considered adding attributes like that, firing that id, class and data would probably cover most use cases. I'll have a think about adding it in for completeness.

    Allan
  • assimilaterassimilater Posts: 3Questions: 0Answers: 0
    edited October 2013
    ah ok, so DT_RowData just needs to be documented then :)

    And I generally agree id, class and data should cover most cases

    Edit: Oh I read that wrong, version '1. ten' meaning not yet released but soon will be :) that explains why it's not in the version I'm currently using
This discussion has been closed.