FixedColumns Plugin Help

FixedColumns Plugin Help

liltonyjaililtonyjai Posts: 1Questions: 0Answers: 0
edited August 2011 in Plug-ins
Hi,

I got a few problems working with the FixedColumn plugin. I actually don't know what is the best way to address these.

First option I tried was to create the datatable, then I append data to datatable and applied the FixedColumn to it. The left column is fixed and that is what I needed. I want to updat the data now purely with javascript. So I destroy the datable and append new data again. That works fine but when I apply FixedColumns again, it keeps givng an error "Invalid Argument" for line 29, chr 123 of the FixedColumns.min.js. Is there a way to destroy the FixedColumns like datatables? I looked over the documentationa and I can't find any methods for that.

I tried another option where I created a datatable in the beginning that is blank (no values), only the headers. But then I can't apply the FixedColumn plugin to a blank datatable. The page won't even load. So this doesn't work.

I also saw that you can update the FixedColumns plugin with fnUpdate() method. But I can't apply FixedColumns in the first place without any data in the datatable.

I hope it is clear. I'm not sure if I explained it correctly.

Replies

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin
    > So I destroy the datable and append new data again

    While that should work, and it does sound like there is an issue with FixedColumns here (it would be very helpful if you could link to your example please), it might be slightly better in terms of performance to use the API methods fnClearTable and fnAddData so you don't need to destroy the table completely.

    > But then I can't apply the FixedColumn plugin to a blank datatable

    Thanks for flagging that up - I'll take a look and see if I can reproduce it. Again if you have an example you can link to that would be very helpful.

    Allan
This discussion has been closed.