Problem with ColReorderWithResize plugin + sScrollx

Problem with ColReorderWithResize plugin + sScrollx

blakituyablakituya Posts: 3Questions: 0Answers: 0
edited October 2012 in Plug-ins
First of all, sorry for my english.

I have in my application the ColReorderWithResize plugin and I want to have an horizontal scroll. Then I write sScrollx: 100% in the datatable configuration. When I try to resize, only headers change their size.

Any solution??

Thanks in advance.

Replies

  • RoyLingRoyLing Posts: 26Questions: 0Answers: 0
    I also encountered this problem when using Firefox.
    Seems it's OK in IE.
  • nlz242nlz242 Posts: 17Questions: 0Answers: 0
    I'm also encountering the same issue using latest google Chrome 23.0.1271.64 m.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Are you using the 1.0.7 version of the plug-in? The code says:

    [code]
    * 4. If sScrollX is enabled (i.e. horizontal scrolling), when resizing a column the width of the other columns is not changed, but the whole
    * table is resized to give an Excel-like behaviour
    [/code]

    So I guess it might work? In fairness that particular plug-in is not a proper solution to reusable column in DataTables and is not supported as part of the core DataTables project. Patches for it are welcome, but it is not being actively developed by myself, or anyone else that I am aware of.

    Allan
  • nlz242nlz242 Posts: 17Questions: 0Answers: 0
    edited November 2012
    Thanks for the reply Allan,

    I'm using version 1.0.7 of the plugin along with DataTables 1.9.4.
    I'll a bit more with it, i may end up disabling sScrollX and just making the table as wide as i want it, inside an overflow div.
    I also noticed that the problem gets worse the more columns i add. Right now i have 38 columns and the resize option ends up working only for the last 2 or 3 columns. The first ones, if i resize the header, the column DOES get resized but by much less. For exemple, the first column's header is 121px, i resize it to 650px, the actual data column goes from 121px to 126px.

    As for the plug-in not being a proper solution, are there alternatives ?
    I need to be able to resize columns, change their order and their visibility, have multiple-sorts and then save all that to a database, so that when users login from any location, they still have their preferences. So far, DataTables seems like it can cover all, with the proper plugins.

    EDIT:
    After playing a bit with my overflow div, i get to the point where i have a result that is almost what i want. I would love to have the behavior documented (that you quoted), working... I find it very annoying that whenever i touch a column, the others start resizing. However, whenever i use sScrollX, i start getting the header vs. data-column mismatch issue.
This discussion has been closed.