display show child rows (extra detail) based on the condition
display show child rows (extra detail) based on the condition
Hi,
Is it possible to display show child rows (extra detail) only for rows that have a specific value returned from the database in JSON.
I would like orange button to only show on rows that have specific column set to true
[retracted]
here is a snippet from my code:
{
"width": "4%",
"class": 'result-alignment',
"orderable": false,
"data": null,
defaultContent: lang == 'az' ? '<a id="details" class="btn btn-info btn-xs">Daha ətraflı</a>' : '<a id="details" class="btn btn-info btn-xs">Более подробно</a>'
}
is it possible to add if statement that would check a data that was returned from database in the JSON?
I hope I am making myself clear if not, please ask me follow up questions.
Any help would be greatly appreciated.
Many thanks,
Mehti
Answers
Hi, mehti,
Also having the same problem. I wrote this code
https://www.datatables.net/forums/discussion/27230/disable-row-details-icon-for-some-rows#latest
I want to disable click on the details button, but right now it disables all buttons.
sorry for raising duplicate item... how could I close this post, as to avoid duplicates...
Don't close. Your code is different I thought maybe my post could help you figure something out.