Cell selection issue

I’m new to handsontable and have inherited an ASP.Net with Razor application that utilizes it on an existing page. I had to add another and changed certain names to avoid colliding with the other hot. My issue is pretty well explained here (including picture of the issue). Any ideas what I’m doing wrong? The hot that I copied the code from still works correctly.

Here’s the relevant code:

var $autosave2 = $('#autosave2');
var $container2 = $("#handsontable2");
var handsontable2 = $container2.data('handsontable2');
var console2 = $("#divButtons2").find("#exampleconsole2");

console2.text("Data loaded from SQL database...");
data2 = $.getValues(ajaxUrl2)
var config2 = {
    data: data2,
    autoWrapRow: true,
    colHeaders: ['<b>Lot</b>', '<b>Product</b>', '<b>Customer</b>', '<b>Qty</b>'],
    colWidths: [
                75, //Lot
                75, //Product
                425, //Customer
                70, //Qty
    ],
    manualColumnResize: true,
    columns: [ { data: 'LotId', @readOnly2 }, { data: 'ProductCode', @readOnly2 }, { data: 'Customer', @readOnly2 }, { data: 'Qty', @readOnly2 } ],
    afterChange: function (change, source) {
        if (source === 'loadData') {
            return; //don't save this change
        }

var hot2;

var hot2 = new Handsontable($container2[0], config2);

Hi @phil.n.deblanc1

Can you share a JSFiddle/JSBin demo where we will be able to replicate the issue? It will be much easier to share the code with developers.

Not sure how I’d do that. The hot JavaScript is in a helper function in my ASP.Net Razor application, there’s a call to a controller in it, and a database call to populate the table.

Used NuGet in VisualStudio to officially add it to the solution, updated the .css and .js references, and it works!

So glad to hear that @phil.n.deblanc1

thanks for an update.