Two line detail

Two line detail

duetltdduetltd Posts: 4Questions: 0Answers: 0
edited August 2013 in General
I have a need at many times to display data on more than 1 row. Looking through the examples I find the "DataTables server-side processing example with hidden row information" would work perfectly however this requires the user to click on each item to see the additional information.

Is it possible to have the additional information display when the table is rendered?

Thanks for the help

http://datatables.net/release-datatables/examples/server_side/row_details.html

Replies

  • duetltdduetltd Posts: 4Questions: 0Answers: 0
    I guess putting questions on this forum is just a total waste of time - thanks anyway
  • jhcomputejhcompute Posts: 26Questions: 0Answers: 0
    edited August 2013
    Yes,

    Allan seems to be the only one that has the experience to answer and I too have to wait for some questions for quite a time span from when I asked. But for a free product, this is normal. He does have a paid support link above. I have never used it though. But when he does answer, it is to the point and helps.

    I will try so,

    The example that you posted is the best way or I use the editor version for my tables.

    When you say more data? Can you explain a little more.

    Is it data that is in the record of the first line?

    If you have it display under the first line, then you would have 2 different fields data displaying so you would have to have a stack header/column for all the records.

    Is the data too long to use a slider to view?

    http://datatables.net/release-datatables/examples/basic_init/scroll_x.html

    Cheers...
  • duetltdduetltd Posts: 4Questions: 0Answers: 0
    thank you for answering much appreciated - the data can be very long and would need to wrap to be readable, I guess this is not possible as I would like. I was able to make this work using the example I quoted and replacing that content with the text area in question however you have to click the + symbol to see the data.

    Thanks again.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi,

    If the "details" row with server-side processing, with with all rows opening automatically is what you are looking for, then yes, this absolutely is possible. The way you could do it is simply to have an fnDrawCallback function which will loop over the rows in the tbody and call fnOpen on each! You wouldn't need (or presumably want) the external controls for clicking on a row to show / hide the details row - it would just always be open, and since you are using server-side processing, this will work nicely as rows are created on every draw.

    Interestingly DataTables 1.10's API has the ability to have multiple child rows per parent row - which might be of interest at some point as well.

    Regarding the support in the forum - please do post questions. Unfortunately with 30+ questions every single day, its impossible for me to answer every support question, hence why priority support is available, so I can prioritise and you can be assured of an answer. Also see: http://datatables.net/forums/discussion/17190/ for an update on support at the start of this month :-).

    Allan
This discussion has been closed.