datatables in a jquery resizable dialog

datatables in a jquery resizable dialog

RISCOSRISCOS Posts: 1Questions: 0Answers: 0
edited June 2012 in General
Hello,

I use datatables in a jquery dialog. I also create my datatables using the sdom property, so that certain things are in a different order.

The problem is, when the dialog resize event fires the table redraws and adjust its column widths, but the datatable dom is remade, but using the default dom, so when I first open my popup the search options are below the table (with my dom layout), but when the popup resizes the search options are doubled, with the search options now above and below the table. Also datatables adds a message about a table having no data.

I fixed this problem by using the dialog's resizeStart event to call fnDestroy() on the data table and hiding the original table. On the resizeEnd event I recreate the table. During the dialog's resize event an animated spinner is now displayed too. So now everything works.

But what i realy want is to just be able to call fnAdjustColumnSizing in the dialogs resize event... is there anyway to do this (other than how I have solved it using all three dialog resize events and destroying/rebuilding the table) so that the default dom layout for the datatbales isn't used by calling fnAdjustColumnSizing (I think this actually happens in fnDraw which is called by fnAdjustColumnSizing)?

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    Is it possible for you to make an example using http://live.datatables.net/#javascript,html,live?
This discussion has been closed.