I have a slickgrid with built-in filtering (using DataView). I assigned a unique identifier to each row of data, and I pass that identifier (not the row number) to a function that updates the div somewhere else in the user interface.
This works fine if I don't filter. But if I filter the column before passing the identifier, it changes the identifier to reflect the line #. It will even change the line identifier to line number.
This is just weird. Any idea what is going on ???
grid_msc.onClick.subscribe(function(e, args) {
var cell = grid_msc.getCellFromEvent(e);
var row = cell.row;
var row_ID = data_msc[row].id;
var msc = data_msc[args.row][grid_msc.getColumns()[args.cell].field];
alert("Row#:"+row+", RowID:"+row_ID+", Value:"+msc);
mscToUI(msc, row_ID);
});
function mscToUI(addC, cellNum) {
alert(addC+", "+cellNum);
$('#selectedMsc').append('<a href="javascript:removemsc('+cellNum+')" id="'+cellNum+'" class="rSel"><img src="images/remove.png" align="texttop" border="0" style="padding-right:4px;">'+addC+'<br /></a>');
}
})
source
share