After click an the specific column appears as selected one
After click an the specific column appears as selected one
Greetings...
I am trying to eliminate the selected style from a column which contains an element, I am using the next code in order to get the row selected take an orange color when I click on it:
function inicializaEstiloGrid(tbodyObj, gridObject) {
/* Add a click handler to the rows - this could be used as a callback */
tbodyObj.click(function(event) {
var seleccionar = !$(event.target.parentNode).hasClass('row_selected');
$(gridObject.fnSettings().aoData).each(function() {
$(this.nTr).removeClass('row_selected');
});
if (seleccionar){
$(event.target.parentNode).addClass('row_selected');
}
});
}
The issue is.. when I click on the last column defined like:
var columnasRegistroPatronal = [ {
sTitle : "",
fnRender: function ( oObj ) {
patronSeleccionado=oObj.aData.cveIdSujetoObligado;
listaPatrones[patronSeleccionado]=oObj.aData;
return mostrarDetalleRegistro(patronSeleccionado);
}
} ];
where mostrarDetalleRegistro is defined like:
function mostrarDetalleRegistro(idPatron){
return "Detalle";
}
When I click on this link the specific element ( or nTr ) remains orange as if it was selected no matter if I select another row. What I want to get is to delete the orange color just when I click the link.
Any Idea? Even if I select the whole row and deselect by clicking once the link element remins with the selected style.
I am trying to eliminate the selected style from a column which contains an element, I am using the next code in order to get the row selected take an orange color when I click on it:
function inicializaEstiloGrid(tbodyObj, gridObject) {
/* Add a click handler to the rows - this could be used as a callback */
tbodyObj.click(function(event) {
var seleccionar = !$(event.target.parentNode).hasClass('row_selected');
$(gridObject.fnSettings().aoData).each(function() {
$(this.nTr).removeClass('row_selected');
});
if (seleccionar){
$(event.target.parentNode).addClass('row_selected');
}
});
}
The issue is.. when I click on the last column defined like:
var columnasRegistroPatronal = [ {
sTitle : "",
fnRender: function ( oObj ) {
patronSeleccionado=oObj.aData.cveIdSujetoObligado;
listaPatrones[patronSeleccionado]=oObj.aData;
return mostrarDetalleRegistro(patronSeleccionado);
}
} ];
where mostrarDetalleRegistro is defined like:
function mostrarDetalleRegistro(idPatron){
return "Detalle";
}
When I click on this link the specific element ( or nTr ) remains orange as if it was selected no matter if I select another row. What I want to get is to delete the orange color just when I click the link.
Any Idea? Even if I select the whole row and deselect by clicking once the link element remins with the selected style.
This discussion has been closed.