Update form fnRemder to mRender - Page 2

Update form fnRemder to mRender

2»

Replies

  • mmcwmmcw Posts: 23Questions: 0Answers: 0
    But where to add this code in my example?
    I have tried before:
    [code ]function fnFormatDetails( oTable, nTr ) { [/code]
    I have tried as:
    [code ]
    "fnDrawCallback": function(oSettings, json) {
    $(".tip-table").tipTip({
    edgeOffset: 1
    });
    $('.rateit').rateit();
    $('tbody tr td.control').click();
    },[/code]

    both wittout success!!
  • allanallan Posts: 63,107Questions: 1Answers: 10,394 Site admin
    Add it after you add the click event handler in your code to open / close the rows.

    Allan
  • mmcwmmcw Posts: 23Questions: 0Answers: 0
    Got it working THANKS!
    However this code does work!

    [code ]
    "fnDrawCallback": function(oSettings, json) {
    $(".tip-table").tipTip({
    edgeOffset: 1
    });
    $('.rateit').rateit();
    $('tbody tr td.control').click();
    },[/code]
  • asittiasitti Posts: 1Questions: 0Answers: 0
    edited December 2012
    Hi Allan,

    all the examples you gave are implying only tho one column. What if the content depends on the value of another column value for example as seen below:


    if (oObj.aData[5] == 'Y') {
    return '';
    }
    else {
    return '';
    }

    The rendered column contains the value of oObj.aData[1] but depends on oObj.aData[5]. How can this be realized using mData? If you use fnRender the value is being overwritten and if I want to use the data somewhere else I get the overwritten value which is wrong.

    Thanks
  • allanallan Posts: 63,107Questions: 1Answers: 10,394 Site admin
    > What if the content depends on the value of another column value

    The third parameter passed into mRender is the data source for the whole row - so you can obtain information from any column from that.

    Allan
This discussion has been closed.