Need to change the label based on the row value in run time
Need to change the label based on the row value in run time

Need to add label for payment_type based on the condition if status "0" then "Cash" and for "1" - credit.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You need to provide a more detailed explanation.
this is my table
I want to change display name based on the condition if status "2" then "Cash" and for "1" - credit.
i solved it by using render
data:"usul",
render:function ( data, type, row ) {
var melumat = data;
if((type === "display" || type === "filter") && melumat ==1){
return 'Nəğd';
}
else if((type === "display" || type === "filter") && melumat ==2){
return 'Kontur';
}
else{
return data;
}