Keep row details open on redraw
Keep row details open on redraw
newfield86
Posts: 5Questions: 0Answers: 0
Hi,
I'm using row details in my table, but when I redraw the table I wanna keep the row details open that are opened. What is the best way to realise that?
Or is there any example available?
I'm using row details in my table, but when I redraw the table I wanna keep the row details open that are opened. What is the best way to realise that?
Or is there any example available?
This discussion has been closed.
Replies
Have you tried "bStateSave": true;
[code]
// Set link for image and text to open tasks
$('#tasks tbody td:first-child img, #tasks tbody td:nth-child(2) a').live('click', function ()
{
var nTr = $(this).parents('tr')[0];
image = nTr.cells[0].getElementsByTagName('img')[0];
taskId = $(image).attr('rel');
if ( oTable.fnIsOpen( nTr ) )
{
image.src = phpVariables.themeUrl+'images/module_images/icon_closed.png';
image.alt = phpVariables.language.txt_open;
image.title = phpVariables.language.txt_open;
oTable.fnClose( nTr );
}
else
{
image.src = phpVariables.themeUrl+'images/module_images/icon_open.png';
image.alt = phpVariables.language.txt_close;
image.title = phpVariables.language.txt_close;
fnFormatDetails( nTr, taskId );
}
} );
// Open tasks in task table and get assignments
fnFormatDetails = function( nTr, taskId )
{
$.get( moduleUrl+'assignment/index/'+taskId, function(data)
{
oTable.fnOpen( nTr, data, 'details' );
} );
}
[/code]