check mark display with color and disable

check mark display with color and disable

KamoAKamoA Posts: 19Questions: 6Answers: 0

Hello,
How can I display check mark with color without allowing to change it?
I try it and no success so far...
Please help.
Here my code:

GR_1 thead, th, td {

line-height: 3.2vh;
white-space: nowrap;
}

GR_1 th, td {

background-color: darkblue;
color: white;
}
table.dataTable thead .sorting:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc_disabled:after,
table.dataTable thead .sorting_desc_disabled:before {
bottom: .5em;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
.even.selected td {
background-color: blue;
}
.odd.selected td {
background-color: blue;
}
</style>

var headerdata = [ 'Product','Description','G/L Acct.','Description.','Sale?'];
var columnwidth = [150,470,150,230,60];
var columnalign = ['dt-body-left','dt-body-left','dt-body-left','dt-body-left','dt-body-center select-checkbox'];
var dataSet = [ ['000000000','UNASSIGNED','5000','SALES - DRY GROCERIES','Y'],['000080 ','2/3/BUNS CHELSEA','5070','SALES - BAKED GOODS','Y'],['000090 ','16/LOAF/DEMPSTERS BREAD RAISIN','5070','SALES - BAKED GOODS','N']] ;
var columnsNM = [];
for (var i in headerdata) {
columnsNM.push({title: headerdata[i],width: columnwidth[i],className: columnalign[i],});
}
$(document).ready( function () {
$('#GR_1').DataTable( {
select: true,
deferRender: true,
data: dataSet,
columns: columnsNM,
scrollY: '86.94vh',
scrollCollapse: false,
orderClasses: false,
paging: false,
bFilter: false,
bLengthChange: false,
bInfo: false,
bProcessing: true,
pageLength: 999,
processing: true,
keys: true,
rowId: function(a){
return 'DT_' + a.uid;
},
} );
var table = $('#GR_1').DataTable();
$('#GR_1 tbody').on( 'click', 'tr', function () {
if ( $(this).hasClass('selected') ) {
$(this).removeClass('selected');
}
else {
table.$('tr.selected').removeClass('selected');
$(this).addClass('selected');
}
} );
} );
</script>

I want in column 'Sale?' see check mark, not values 'Y', 'N'.
Thank you.

Answers

  • KamoAKamoA Posts: 19Questions: 6Answers: 0

    Sorry,
    I found solution. Please disregard!!!

This discussion has been closed.