Change oLanguage.sInfoPostFix property after initialization

Change oLanguage.sInfoPostFix property after initialization

FracuFracu Posts: 2Questions: 1Answers: 0

I would like to set the oLanguage.sInfoPostFix property to append information to the pagination text (for instance "Last updated at 22:35"). This information is coming inside ajax sourced data so it may change from one request to another.

I know I can set this property at initialization but how can I alter this property dinamically?

Thanks in advance!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,893Questions: 1Answers: 10,531 Site admin
    Answer ✓

    I'm sorry - there is no API method to change that option dynamically. It can only be set at initialisation time. Your best bet would be to write the update information into another element - possible once inserted like in this example.

    Allan

  • FracuFracu Posts: 2Questions: 1Answers: 0
    edited July 2017

    Finally I decided to manually insert a div after the pagination text after ajax is loaded using initComplete callback

    'initComplete': function(settings, json) {
    $('<div style="padding:0.755em;float:left"><b>'+lastUpdateText + '</b></div>').insertAfter('#'+tableId+"_info");
      }
    

    Thanks a lot!

This discussion has been closed.