Hi,
How to disable and enable the formula in handsontable based on the button click.
Hi,
How to disable and enable the formula in handsontable based on the button click.
Hi,
You want to disable a single formula or the formula plugin?
Wojciech
Hi,
Thanks for responding. I have the requirement like onec I copy or add same value in one row (row having approximately 400 column ) the formula must have to disable , then when I clicked one button after that the formula enable and all calculation need to be complete in whole table because all calculation will happen based on the copied values.
Now copy and calculation happening parallel so page is hanging.
There is no way to pause the calculations. You may consider calculating the deta aserver-side or replacing the formulas with empty data if they are not neeeded.
Hi,
I can do it.But 1st time when table rendering its disable then I click the btnCalculate and its fine but next time when again I did any change before that I have to make it false but where I have to put formulas=false ?
I have the below code for making true in button click as:
$("#btnCalculate").on(“click”,function(){
settings.formulas = true;
tableObject.updateSettings(settings);
tableObject.render();
Could you send over a demo that we’ll be able to test? That woyld be easier to check what exactly are the requirements.
Hi,
The problem is the calculation of each formula cell in the table, its taking a long long time to complete.so need to performance improve.
$(’#EpiParameterDiv’).on(‘shown.bs.collapse’, ‘.accrodianDataPanel’, function (e, source) {
if (source == 'export') {
$(e.target).addClass('in');
}
hasAccordionOpened = false;
$(e.target).prev('.panel-heading').addClass('p_heading');
$(e.target).prev('.panel-heading').children().children().next().removeClass("glyphicon glyphicon-chevron-right");
$(e.target).prev('.panel-heading').children().children().next().addClass("glyphicon glyphicon-chevron-down");
var tableContainer = $(e.target).find('.handsonTbl');
var tableObject = tableContainer.handsontable('getInstance');
var settings;
if (tableObject) {
settings = tableObject.getSettings();
if (settings) {
if (settings.formulas === true) {
settings.formulas = false;
tableObject.updateSettings(settings);
var _data = tableObject.getDataAtCell(1, parseInt(periodStartIndex));
if (_data != undefined) {
if (source == 'export') {
tableObject.setDataAtCell(1, parseInt(periodStartIndex), _data, 'nonUser');
hasAccordionOpened = true;
}
else {
$("#loader").show();
setTimeout(function () {
tableObject.setDataAtCell(1, parseInt(periodStartIndex), _data, 'nonUser');
$("#loader").hide();
}, 0);
}
}
}
else {
tableObject.render();
}
}
}
I would recommend doing the server-side calculations. Those are always faster than counting data on Clients-side.
However, if you have an Extended Support plan you can also send the .zipped project and our developers will check if there are any other improvements that you can take to make it faster.