While loading how can I make Non Editable rows based on perticular column value Datatable/Jeditable

While loading how can I make Non Editable rows based on perticular column value Datatable/Jeditable

ganesh610ganesh610 Posts: 7Questions: 0Answers: 0
edited March 2014 in Editor
Hi,

Could you please someone help me on this. While loading how can I make Non Editable row based on perticular column value in the same row.

For Example: Employee Record with columns: EmpNo, EmpName, Designation.
While loading If Designation value = "CEO" then that perticular Employee record(Row) should not be Editable and all other records should be editable.

Thanks,
Ganesh

Replies

  • ganesh610ganesh610 Posts: 7Questions: 0Answers: 0
    edited March 2014
    I am trying to Use fnRowCallback function to make Row disable but its not working for me.

    "fnRowCallback": function( nRow, aData, iDisplayIndex ) {
    $(nRow).attr("id",aData[0]);
    if(aData[2]== "CEO"){
    $(nRow).class = "read_only";//Trying to make
    } Row Non Editable
    return nRow;
    }

    Could you please suggest me better way to make Non Editable row based on the Column value..?

    Thanks,
    Ganesh
  • ganesh610ganesh610 Posts: 7Questions: 0Answers: 0
    Can we do this in Pre-initialisation..? If Yes could you please provide some example which have same scenario..

    Thanks,
    Ganesh
  • ganesh610ganesh610 Posts: 7Questions: 0Answers: 0
    edited March 2014
    Could you pleease some one help me on this....?
This discussion has been closed.