I have a slickgrid with inline filtering (using DataView). I've assigned unique ID to each row of data and I pass this ID (not the row number) to a function which updates a div someplace else on the UI.
This works fine if I don't filter. But if I filter the column prior to passing the ID, it changes the ID to reflect the row #. It will even change a string ID to a row number.
That just seems weird. Any idea what's going on???
grid_msc.onClick.subscribe(function(e, args) {
var cell = grid_msc.getCellFromEvent(e);
var row = cell.row; // get row #
var row_ID = data_msc[row].id; // get the row ID, not row #
var msc = data_msc[args.row][grid_msc.getColumns()[args.cell].field];
alert("Row#:"+row+", RowID:"+row_ID+", Value:"+msc);
mscToUI(msc, row_ID);
});
// Add the selected item to the UI
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>');
}
})