Problems with Colvis and Columnfilter

Problems with Colvis and Columnfilter

DrakoDrako Posts: 73Questions: 0Answers: 0
edited September 2011 in Plug-ins
First, i cant setup columnfilter at all, i have the js, i also initialize it ( oTable.columnFilter();) but the inputs wont appear, all i get is a regular tfoot on my table, any ideias why this might happen?

But Colvis i can set it up fine, it works for hiding columns, but when i want to show them back the header will duplicate and the server is loading data msg freezes in the middle of the table.

pic

http://i54.tinypic.com/29upqgy.jpg

thanks!!!

(got this captcha when uploading this pic http://i53.tinypic.com/nwzcy1.jpg)

Replies

  • DrakoDrako Posts: 73Questions: 0Answers: 0
    seems like both problems only happen when i use ScrollY

    any way to fix it?
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    when you use scrollY, in order to enforce a size and make the rows scrollable within that space, datatables takes your thead and tfoot and copies them to another div (so they don't scroll) and makes the original thead and tfoot display:none (or something else to affect the visibility)

    if you're doing something strange in html or css that keeps the thead and tfoot from going invisible, you'll show 2 headers or footers.
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    got it.. so if i want to use this plugins i have to give up the scroller?
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    no, you just need to be careful about what css you have applied to your header.
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    thanks fbas!!! i kinda fixed it.. but still having trouble, maybe can you give some light?

    i added this to the colvis.css

    div.dataTables_scrollBody table.display thead th{
    display: none; }

    it works, the thead doesnt duplicate anymore, but i still couldnt remove the msg saying processing and when the page loads the cells are not aligned with the head (but they get aligned after hiding and showing one column).

    picture showing the problem

    http://i51.tinypic.com/106ere1.jpg

    thanks a lot!!
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    you can call fnAdjustColumnSizing() to ask DT to align columns http://www.datatables.net/ref#fnAdjustColumnSizing instead of hiding and showing a column

    if the "Processing..." message doesn't go away, that might be a sign that your code is halting somewhere in the process. have you checked the debugger for errors?
  • DrakoDrako Posts: 73Questions: 0Answers: 0
    i get this errors on the debugger

    http://i54.tinypic.com/11s36n6.jpg


    i tried to use fnAdjustColumnSizing() but i wont do anything.. tried to put on callback from fnServerdata and other places too.. but nothing happens.

    thanks for all the help
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    "There's your problem right there!"

    Obviously something is wrong. Your datatable instance looks like it got clobbered or something. or maybe your oTable variable is out of scope when you call this.
This discussion has been closed.