have a datatable continue beside the first one. possible?

have a datatable continue beside the first one. possible?

vipersvipers Posts: 2Questions: 0Answers: 0
edited September 2012 in General
hi. i was wondering if it is possible to have a datatable show for example 25 rows and then at the 26th row to start a new table beside the first one?
example:


------------- --------------
- head1- head2 - head1 - head2-
------------- --------------
- mike - 1000- - allen - 1231 -
- dan - 1212- - dave - 1245 -
------------- --------------

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Sure - just position the two next to each other using CSS :-). A bit of absolute positioning would probably be easiest.

    Allan
  • vipersvipers Posts: 2Questions: 0Answers: 0
    Hi Allan, thanks for the quick reply.
    this means that i need 2 tables with 2 datasources dont it? is there a way to have just one that stops rendering at a given row and continues from the top next to the first one?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Ah I see - in that case no, there is no method of doing that which is built into DataTables - but it might be able to to use the API to do it. You could use fnGetData to get the data from the first table and build the second table with that, and then listen to events such as 'draw' on the first table to take actions on the second table.

    I've not seen that implemented before, but it should be possible. Let us know how you get on :-)

    Allan
This discussion has been closed.