fnOpen Issue

fnOpen Issue

soberspsobersp Posts: 28Questions: 0Answers: 0
edited October 2009 in General
Hi Allan,

1st Thanks for all your help so far. I am now able to add lots of functionalities to my DataTable,
Able to Dynamically Add Columns with Auto Referesh per 2 Secs, w/o any Memory Leak....

I came across this Issue

I am using Server Side Proccessing and for Refresh I use fnDraw.

I am using row details as in http://datatables.net/examples/server_side/row_details.html
Now on Page Refresh, I want to save the state, of the user-clicked open_details

I call the below function which iterates through all the rows which where open for details(openRowArray), after I have painted the Table Successfully

function fnAddDetails(){
for (var q=0; q

Replies

  • allanallan Posts: 61,863Questions: 1Answers: 10,135 Site admin
    Hi Sobers,

    > Dynamically Add Columns

    You might need to do some real hacking of DataTables to do this. It's possible, but not really a supported interaction :-)

    Regarding your main question - yes I think this is an issue between how the server-side processing works and how fnOpen is being used in this case. fnGetPosition(), for example, will return information about the rows position in aoData - but that array is emptied on every redraw, so fnGetPosition() won't be accurate.

    What you really need to do is have a unique ID for each row (possibly in a hidden column) and store that for every row which is 'open'. Then you can loop over the open rows on each draw, and check if any of the rows currently being displayed need to be opened.

    Regards,
    Allan
  • soberspsobersp Posts: 28Questions: 0Answers: 0
    Thanks Allan, I used the array to store the position, with RowCallBack, using it to restore the view...

    Thanks a Loot again

    Sobers
This discussion has been closed.