consider the code :
localStorage.setItem(gridNameForUDF + ' - frozen columns', '2');
jq(document).ready(function() {
var VFPAGE = ' TestPage';
var currentLocation = window.location.href;
var newLocation = currentLocation.replace('gblite.','c.');
newLocation = newLocation.substring(0, newLocation.indexOf('Grid?')) + VFPAGE;
var gridInfo = getGridInfoByName('p');
var priceBookEntryIdMetaCol;
//console.log('VFPAGE '+VFPAGE);
for (var i=0; i<gridInfo.metaColumns.length; i++) {
var thisCol = gridInfo.metaColumns[i];
if (thisCol.fieldName == '****') {
**** = thisCol;
break;
}
}
var dataRows = jq('table#gbMainTable > tbody > tr.dr');
dataRows.find('td[name="' + ****.fieldId + '"]').each(function() {
var cell = jq(this);
var recordId = cell.closest('tr').attr('id');
console.log('====cell====',cell.find('td').find('span'));
cell.on('click', function(e) {
console.log('=======cell=====');
e.stopPropagation();
window.open(newLocation + '?oliId=' + recordId, '_blank');
});
});
});
At top I am setting some values in localstorage to set the first two columns of my grid freeze.
And then registering an onclick event on a cell.
Now what happens is , the onlclick gets registered well, but after the js loads fully the class name if the cell gets changed to 'ui-selectee none' where as if I remove the frozen column code localStorage.setItem(gridNameForUDF + ' - frozen columns', '2');
then the class name is 'ui-selectee'.
Hence the cell on click does not work.
Including frozen column creates a another div component.
Is there a solution for this? I cannot use getElementById, I cannot remove the frozen column code too.