Putting it all together

Putting it all together

Marko76Marko76 Posts: 16Questions: 0Answers: 0
edited January 2014 in General
Hi folks,

I was wondering if anyone has an example where all of the features of data tables along with extras are working applied to a single table? The reason I ask is because I spent a ton of time trying to get them to all work together but it seems to me that the various extras where not meant to be used on the same table. Here are my requirements:

1. Have locked header and 1st column to where header and 1st column are always visible regardless of the size of the table
2. Have re-sizable column widths
3. Have draggable columns to where column order can be changed
4. Sort by specific columns (asc/desc)
5. Have footer rows which do not scroll - are locked

DataTables support all of the above scenarios but through various extras. Each one of these extras work fine on their own but when all this is put together, it displays some very strange behavior. For example, columns and their headers get severely misaligned when column width is re-sized and if I'm also using the fixedColumns extra to fix the 1st column in place.

So basically I was wondering if anyone can provide an example that covers all of the above scenarios used together on a single table and working properly?

Replies

  • Marko76Marko76 Posts: 16Questions: 0Answers: 0
    Another example is when 1st column is locked and a used tries to drag/re-order that column. Because there is a superimposed table on top of the real table in order to achieve column locking, when 1st column is moved/reordered the superimposed table remains in sport and it looks like there are 2 columns with the same name now. Is there a way to prevent reordering of the column which has been locked?

    Here is the video of the issue. Notice that the Student Name column when reordered will show up twice. However once I refresh the page the correct order is restored because the table is re-rendered properly.

    http://screencast.com/t/iGbVJq4rvG
  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    > 2. Have re-sizable column widths

    This one is not supported I'm afraid. There is a 'ColReorderWithReisze' plug-in that was developed, but not by myself and so I can't support it. I don't think it works with current version of DataTables.

    Beyond that, I think this does all that you need: http://live.datatables.net/iRAk/1/

    Allan
  • Marko76Marko76 Posts: 16Questions: 0Answers: 0
    Allan thanks for the quick response. Indeed I was using the ColReorderWithReisze plug-in so I guess that particular feature I will have to ditch. Do you have any plans on providing this functionality in the near future?

    Also do you have advice with regards to my 2nd issue above?
  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    > Do you have any plans on providing this functionality in the near future?

    No. Long term, yes, but its not a priority at the moment, relative to the other things planned for DataTables.

    Regarding the second issue, I think you answered it yourself here: http://datatables.net/forums/discussion/19205/

    Allan
  • Marko76Marko76 Posts: 16Questions: 0Answers: 0
    Yes indeed I figured out the 2nd issue right after I asked about it... Sorry for the question bombardment and once again thank you for your responses.
This discussion has been closed.