Possible to have full-width div in row with multiple columns?

Possible to have full-width div in row with multiple columns?

rwkiiirwkiii Posts: 13Questions: 5Answers: 0
edited July 2014 in Free community support

I am new to DataTables and haven't found an answer to whether it can support a particular use. I would like to know if this kind of layout is possible:

In a single row:

Column 1 | Column 2 | Column 3 | Column 4

A full length row for small print details

The above layout would be similar to this HTML:

<tr>

<td>

<div id="column1" style="float: left; width: 25%;">Some Text</div>
<div id="column2" style="float: left; width: 25%;">Some Text</div>
<div id="column3" style="float: left; width: 25%;">Some Text</div>
<div id="column4" style="float: left; width: 25%;">Some Text</div>
<div id="fullwidth" style="clear:both; width: 100%;">A full line of text</div>

</td>

</tr>

The reason why I am asking is because I need to use DataTable's column sorting for columns 1, 2, 3, and 4. I also want the highlighting to work for the entire row including the 4 columns and the full length 'row' underneath.

Is this possible? If so, how is it done?

Thanks.

Replies

  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin

    Like this: http://datatables.net/examples/api/row_details.html ? You can just have the child rows displayed all the time if you so wish.

    Allan

  • rwkiiirwkiii Posts: 13Questions: 5Answers: 0

    Hi Allan. Yes, I asked this question before stumbling onto Child Rows and these will work perfect for us. In fact, after reading article after article and viewing all of the examples I am wondering if there's anything DataTables CAN'T do? :)

    DataTables is a very nice piece of work. It hasn't stopped impressing me yet. I'm glad I found it - and all I was initially looking for was a table solution with vertical scrolling...

  • rwkiiirwkiii Posts: 13Questions: 5Answers: 0

    A sidenote... This is my first exposure to Markdown - I think I hate it. It's very difficult to work with IMHO.

    Also, I don't see any way to mark this question as answered or to mark your reply as an answer.

  • allanallan Posts: 62,858Questions: 1Answers: 10,344 Site admin

    Hi,

    Heh - Markdown it probably a love it or hate it thing... Regarding marking the question as resolved - the original post was opened as a "New discussion" rather than "Ask a question" which is why there is no option to mark an answer as accepted.

    I am wondering if there's anything DataTables CAN'T do? :)

    I really wish it would bring me breakfast ;-)

    Great to hear that you are enjoying using DataTables so far!

    Regards,
    Allan

This discussion has been closed.