Conditional Formatting with onClick
Conditional Formatting with onClick
DestiaTraffic
Posts: 4Questions: 0Answers: 0
Hi!
I'd wish to run a simple range selection function in datatable where the rows between two clicked cells are highlighted with something like this
[code]
$(oTable1.fnSettings().aoData).each(function ()
{
var iPos = oTable1.fnGetPosition( this );
valueinaData5=xxxx;
if((lor1_set>0 && lor2_set>0) &&(valueinaData5>=lor1_set && valueinaData5<=lor2_set))
{
$(this.nTr).addClass('row_selected');
}
$(this.nTr).removeClass('row_selected');*/
});
[/code]
within an
[code]
"fnDrawCallback": function( oSettings ) {
$('#LINKLIST tbody tr').click( function() {
}):
}):
[/code]
event. I just do not understand how to get the value of a (hidden column) field to see whether to highlight the column or not. It is probably something very trivial, but I'm too dumb to get it :)
Thans in advance!
I'd wish to run a simple range selection function in datatable where the rows between two clicked cells are highlighted with something like this
[code]
$(oTable1.fnSettings().aoData).each(function ()
{
var iPos = oTable1.fnGetPosition( this );
valueinaData5=xxxx;
if((lor1_set>0 && lor2_set>0) &&(valueinaData5>=lor1_set && valueinaData5<=lor2_set))
{
$(this.nTr).addClass('row_selected');
}
$(this.nTr).removeClass('row_selected');*/
});
[/code]
within an
[code]
"fnDrawCallback": function( oSettings ) {
$('#LINKLIST tbody tr').click( function() {
}):
}):
[/code]
event. I just do not understand how to get the value of a (hidden column) field to see whether to highlight the column or not. It is probably something very trivial, but I'm too dumb to get it :)
Thans in advance!
This discussion has been closed.
Replies
It was very trivial indeed.
[code]
valueinaData5=parseInt(this._aData[5]);
[/code]