Disable dropdown for certain usergroups based on same dropdown value
Disable dropdown for certain usergroups based on same dropdown value
Hi all,
Just trying to figure out how we do this.
I have a drop down that has "1, 2, 3, 4, 5, 6"
I want to disable this dropdown from user group A if the dropdown has above 3 selected.
I tried adding an if into the data:
{ data: "assetStatus",
"render": function ( data, type, row, meta ) {
if((data != '1' || data != '2' || data != '3') && permission == 'A') {
editor.disable( [
'dropdown',
] );
}
}
},
Datatables didn't like that.
I tried a separate query
if((row['dropdown'] != '1' || row['dropdown']!= '2' || row['dropdown']!= '3') && permission == 'A') {
editor.disable(
[
'dropdown'
]
);
}
Datatables didn't like that either.
Anyone have an idea how to do this?
Answers
ok, figured it, I'm an idiot. forgot to add the return data.