Displaying a given table in "gallery" form

Displaying a given table in "gallery" form

ignisphaseoneignisphaseone Posts: 2Questions: 0Answers: 0
edited April 2013 in General
Hey guys,

I'm very new to DataTables and I'm trying to experiment with some different table views. One viewing mode is a traditional table (which is very simple and easy). Another view is a detail view, where I cram all the data from multiple rows into a single cell, and only display an image and the details of that image. This is a little hacky, but it works with all of DataTable's searching functions.

The third view is supposed to be a 6x3 grid of images, based on what is in the DataTable's search. What is the easiest way to get DataTables to display it in this way?

Here are some solutions I came up with:
1) Give up and use a different script to render a given list in the grid format, and add custom pagination/search boxes similar to DataTables.
2) Style the , , or elements to somehow draw a maximum of 18 rows, and have them display in the given grid positions.
3) Find a DataTables plugin that already has this style of view, or maybe write one myself.

Thanks for your time guys!

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    This isn't possible in DataTables. DataTables is table based, not cell based. The following must always be true: `rows * columns = cell` .

    Sorry, but it unlikely that DataTables itself will ever support a gallery grid type layout, as it would involve adding and removing cells dynamically, which would be slow (using divs would be faster, but DataTables uses tables).

    Allan
  • ignisphaseoneignisphaseone Posts: 2Questions: 0Answers: 0
    Cool, thanks for the heads up.

    My current plan then is going to be make my own layout grid of s, and my own custom controls for what shows.
This discussion has been closed.