Running standingReDraw on dataTables 1.7.6

Running standingReDraw on dataTables 1.7.6

streetlightstreetlight Posts: 26Questions: 0Answers: 0
edited October 2012 in General
Hey all,

I was hoping someone out there can give me advice on how to implement standingReDraw on 1.7.6. I want dont want to reload the entire table after making a change on a entry. Is this the right function to look towards?

Please help.

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Have you tried it? 1.7.6 is really old now, but the plug-in should work okay...

    Allan
  • streetlightstreetlight Posts: 26Questions: 0Answers: 0
    Allan,

    Thank you so much for your response! I've tried to install it and run it in place of oTable.fnDraw in my reload function, to no avail. The function seems to run, but it doesn't produce the results I want.

    Is there another way to try this by any chance? Your help is appreciated more than you know.

    N
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    I guess my first question is what do you expect to happen, and the second question is what is actually happening? It is possible that some of the internal variables that are used by the plug-in have changed. Any errors on the Javascript console of your browser?

    Allan
  • streetlightstreetlight Posts: 26Questions: 0Answers: 0
    As of right now, there's an ajax call to edit each line of the datatable. After this is done, I want the page to reload only the paginated page, rather than the entire table (which is happening now).

    I've got no errors in the console. The basic thing that's happening is that on the reload, the oTable.fnClearTable() is ran, the data is sent via JSON (using fnAddData), then the table is reloaded using oTable.fnDraw(). I attempted to change this to fnStandingReDraw(), but I cannot get it to work.

    Thank for your patience, too, by the way!

    This is my code for the fnDraw API function too, if that helps (got the idea it might be this through this link = http://datatables.net/forums/discussion/11934/fndraw-without-resetting-pagination/p1)

    [code]
    this.fnDraw = function( bComplete )
    {
    var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
    if ( typeof bComplete != 'undefined' && bComplete === false )
    {
    _fnCalculateEnd( oSettings );
    _fnDraw( oSettings );
    }
    else
    {
    _fnReDraw( oSettings );
    }
    };
    [/code]
  • streetlightstreetlight Posts: 26Questions: 0Answers: 0
    Also, when I walk through the function, I try running StandingRedraw before everything else and pause it, and nothing changes. Would it have to do with the ajax?
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    If you are using an Ajax source, I'd suggest just using the fnReloadAjax plug-in, it has a standing redraw option (check the parameters). Failing that, I think we'd need a link to a test page showing the issue.

    Allan
This discussion has been closed.