Columns classname from data element
Columns classname from data element
Lorderich
Posts: 1Questions: 0Answers: 0
Hey guys,
i am trying to define the classname of a cell from a dataelement of the row.
So the classname is dynamic, based on a data value.
"columns": [
{"className": 'details-control',"orderable": false,"data": null, "defaultContent": ''},
{ "data": "accounting_type_by_Accounting_Type.Accounting_Type_Short_Code" },
{ "data": "ID" },
{ "data": "Payment_Date" },
{ "data": "costcenter_by_Costcenter.DE_Name" },
{ "data": "accounting_class_by_Accounting_Class.DE_FinancialName" },
{ "data": "accounting_payment_types_by_Payment_Type.DE_Name" },
{ "data": "Amount", classname="accounting_type_by_Accounting_Type.Accounting_Type_Short_Code"},
],
So am i am trying to get the classname from the data element accounting_type_by_Accounting_Type.Accounting_Type_Short_Code.
Is there an easy way to get this to work?
Kind regards
Lorderich
This discussion has been closed.
Replies
Hi @Lorderich ,
You could do this in the
createRow
- the example on that page looks pretty much exactly what you want.Cheers,
Colin