Change layout/presentation in mRender - cache struggle
Change layout/presentation in mRender - cache struggle
kktos
Posts: 11Questions: 0Answers: 0
Hi all,
I'm wondering if there is a proper way to change the rendering of a table on-the-fly.
Let's say I have a table with a full view, with pictures and so on.
I wish to allow the user to have a compact view with less info and no picture.
Using a flag to tell the mRender functions to display a compact view or a full view is not working.
And that's normal. The dataTable cache is active then only the first call will be type='display'.
Every other fnDraw will call type='order'.
Important: it's not a ServerSide table and I don't want to clear the table and re addData.
Any suggestion on the proper way ? I can try to flush DT cache but I wish to use the politically correct way.
cheers.
/tm
I'm wondering if there is a proper way to change the rendering of a table on-the-fly.
Let's say I have a table with a full view, with pictures and so on.
I wish to allow the user to have a compact view with less info and no picture.
Using a flag to tell the mRender functions to display a compact view or a full view is not working.
And that's normal. The dataTable cache is active then only the first call will be type='display'.
Every other fnDraw will call type='order'.
Important: it's not a ServerSide table and I don't want to clear the table and re addData.
Any suggestion on the proper way ? I can try to flush DT cache but I wish to use the politically correct way.
cheers.
/tm
This discussion has been closed.
Replies
[code]
var idx,
len,
list= oTable.dataTableSettings[0].aoData;
for(idx= 0, len= list.length; idx
Allan