Keep row details open on redraw

Keep row details open on redraw

newfield86newfield86 Posts: 5Questions: 0Answers: 0
edited August 2012 in General
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?

Replies

  • DenonthDenonth Posts: 76Questions: 0Answers: 0
    Can you show me how are you using a details row? because I can't initialize it correctly.
    Have you tried "bStateSave": true;
  • newfield86newfield86 Posts: 5Questions: 0Answers: 0
    Below the code of how I use it. bStateSave doesn't work, already tried that.

    [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]
  • newfield86newfield86 Posts: 5Questions: 0Answers: 0
    Nobody has ever had this problem? Does someone has any idea?
This discussion has been closed.