meetselva / fixed-table-rows-cols

Fixed Table Header and Columns
http://meetselva.github.com/fixed-table-rows-cols/
Other
77 stars 42 forks source link

Does not work at all for me #13

Closed don-odyssey closed 10 years ago

don-odyssey commented 10 years ago

Hi.

As per the subject, I cannot get it to work but there are no errors (Javascript nor PHP). How can I debug please?

meetselva commented 10 years ago

Please post an example or demo the scenario in http://jsfiddle.net.

don-odyssey commented 10 years ago

It seems to work when I create a test PHP file but not when the table is generated via an AJAX call. I have tried the JS code both in before the and in the AJAX file but neither work.

Does this make sense? Should I call the JS code that makes the table scrollable as a callback function after the AJAX has rendered the table?

don-odyssey commented 10 years ago

Yes, that was it! It is working now. However, the tables renders poorly. Do you provide documentation on the options used in fxdHdrCol()? I don't quite understand what all the options do or why some are even needed?

For example, I do not want fixed columns but it seems i must with this library? Also, the row of header columns, TH, are displaying twice only when I use your library. One is fixed and the other scrolls

Thanks / Don

don-odyssey commented 10 years ago

Somewhat fixed as there are no more duplicate header rows. Apparently, the library cannot handle DIV elements between TH-TH

However, the scrolling is messy as the first TD row scrolls over the row and there are some duplicate header labels. Very odd.

meetselva commented 10 years ago

You could check out the demo and documentation page at http://meetselva.github.io/fixed-table-rows-cols/

The fixed column is optional, if you set "fixedCols: 0", then all columns would be scrollable.

As for the row header, I think the CSS is not imported or imported in wrong order. Post the code you are trying so that I can take a look.

don-odyssey commented 10 years ago

Thanks for your reply. I've place a bare bones demo on: http://test.program-it.ca

I've only used my code which is index.php, the jQuery library and your files (two JS and one CSS) As you can see, the headers are not only messed up, but the other rows scroll under the header row.

meetselva commented 10 years ago

I moved the code from your demo site http://jsfiddle.net/9yt45ogp/ and made some changes. Below are few changes,

-> Fixed </th at (Line 39)

<th class="first"><div class="th-inner">Added</div></th

-> Added below style so that the header is not transparent

table { background-color: white; }

One other difference between your test page and the jsfiddle is that the doctype, First try the above 2 suggestion and let me know.. Most likely, the first one is the cause of all issues.

don-odyssey commented 10 years ago

Hi,

Thanks for your help. I made some changes to the JSFiddle so that it mimics my code exactly. It works on the JSFiddle page but not on my code. Perhaps the library doesn't render well in AJAX or perhaps it's the DocType or perhaps something else.

Any way, thanks again but I'm going to move on and look for a library that's more stable or perhaps been around longer and can handle different coding situations. Perhaps I'll revisit your library in a year or so.

Best of luck, Don

meetselva commented 10 years ago

Thank for trying out the plugin.

This is a light weight plugin that handles fixed rows + fixed column with minimal requirements. Perhaps, If you could post the issue in the test page.. I can take a look and see what is going on.

Alternatively, you could try jQgrid, tablesorter for more complicated solutions.

Good luck, SK