Disable sorting for certain rows

Disable sorting for certain rows

denisdenis Posts: 2Questions: 0Answers: 0
edited August 2009 in General
Hi Allan
Thank for creating DataTables, it's a very flexible and enjoyable tool. I was searching forums but couldn't find an answer to my question

I need a structure in which every row have a nested row(s).In terms it's very simple something like this:

Parent row

Child row
Child row


Nested rows are always shown but not sortable. http://datatables.net/1.5-beta/examples/api/row_details.html this example is close to what I want except that rows are hidden initially(I want them to be always displayed).

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Hi denis,

    The use of fnOpen and fnClose are as close to child nodes as DataTables comes at the moment. If, as it sounds like, you just want a 'details' row for each of your rows displayed, then this can be done with fnOpen. Simply call fnOpen for each row (on draw callback or whatever suits best) and don't present a control to close the row!

    Regards,
    Allan
  • denisdenis Posts: 2Questions: 0Answers: 0
    Oh. I guess that was an obvious solution. Just didn't want to do it without asking, sounded little bit like a hack to me at first. Thank you for reply.
This discussion has been closed.