Posted 15 September 2017, 3:26 am EST
I have a page the uses one FpSpread control that is repopulated from multiple datasets depending on what the user wants to view. The last column in the table contains the identifier of the row. The column label is always ‘ID’. I use GetHiddenColumn on the client side to read the row identifier to decide what to do.
var vID = tblCtl.GetHiddenValue(theRow, ‘ID’);
This works fine until I populate the FpSpread control with a dataset with a different number of columns.
I tracked the issue down to the follow function (initHiddenColumns) in the multicolumncombobox.js file:
FpSpreadJS.prototype.initHiddenColumns = function (e) {
for (var b = , d = 0, c = e.attributes.length - 1; c >= 0; c–) {
var a = e.attributes[c];
if (a.name.length > 2 && a.name.charAt(0).toUpperCase() == “C” && a.name.charAt(1) == "") {
//add the following logic to eliminate columns that do not belong
var theCol = parseInt(a.name.replace('c’, ‘’));
if (theCol <= e.ColCount) {
b[a.name] = a.value; d++
}
}
}
b.count_of_hidden_cols = d;
return b
};
I modified the function to eliminate any columns that exceed the column count of the table.
Please add this to your list of bugs so it can be fixed.
I am using version 10.4.20172.0