Simply way to write in a cell without server side

Simply way to write in a cell without server side

ratm54ratm54 Posts: 9Questions: 0Answers: 0
edited March 2011 in General
Hello,

How to simply write into a dataTable cell without server side.

Thanks by advance,
Anthony

Replies

  • ratm54ratm54 Posts: 9Questions: 0Answers: 0
    edited March 2011
    I found with jeditable plug-in :
    [code]
    function addCellEditable(){

    $('td', oTable.fnGetNodes()).editable(function(value, settings) {
    //console.log(this);
    //console.log(value);
    //console.log(settings);
    return(value);
    }, {
    type : 'textarea',
    submit : 'OK'

    });
    }
    [/code]
  • ratm54ratm54 Posts: 9Questions: 0Answers: 0
    With the update of data in datatable :
    [code]
    $('td', oTable.fnGetNodes()).editable(function(value, settings) {
    //console.log(this);
    //console.log(value);
    //console.log(settings);
    var aPos = oTable.fnGetPosition(this);
    // warning aPos[2] cause of hidden column aPos[1] in other case
    oTable.fnUpdate(value, aPos[0],aPos[2], false);
    return(value);
    }, {
    type : "textarea",
    rows : "1",
    submit : "Valider",
    height : "30px",
    placeholder: 'Cliquer ici pour
This discussion has been closed.