Open hegdeanuradha opened 5 years ago
I am trying to do something like this.
var updateType = function (obj, cel, val) { debugger; if (val == "Attribute1") alert("A1"); else if (val == "Attribute2") alert("A2"); else if (val == "Attribute3") alert("A3"); else if (val == "Attribute4") alert("A4"); }
$('#my').jexcel({ data: data, colHeaders: ['Attribute', 'Value'], colWidths: [300, 100], columns: [ { type: 'dropdown', source: ['Attribute1', 'Attribute2', 'Attribute3', 'Attribute4'], onchange: updateType}, { type: 'text' }, ] });
i.e, I want to have an onChange event on column1. Based on the value selected in 'Attribute' column, I want to make a change on the corresponding cell in 'Value' column. It is somehow not working for me. Is this possible?
onchange should be global.
I am trying to do something like this.
var updateType = function (obj, cel, val) { debugger; if (val == "Attribute1") alert("A1"); else if (val == "Attribute2") alert("A2"); else if (val == "Attribute3") alert("A3"); else if (val == "Attribute4") alert("A4"); }
$('#my').jexcel({ data: data, colHeaders: ['Attribute', 'Value'], colWidths: [300, 100], columns: [ { type: 'dropdown', source: ['Attribute1', 'Attribute2', 'Attribute3', 'Attribute4'], onchange: updateType}, { type: 'text' }, ] });
i.e, I want to have an onChange event on column1. Based on the value selected in 'Attribute' column, I want to make a change on the corresponding cell in 'Value' column. It is somehow not working for me. Is this possible?