- Mon Feb 23, 2015 9:03 am
#782115
Hi all,
I have created a grid in which three text boxes. the first text box is pre filled and second textbox will be manually fill and the third text box is having the result of first and second textbox calculated value.
If the first textbox have value 2 and second text box having value 1 then the third textbox have value(firsttextbox - secondtextbox) i.e. (2-1=1).
i have created a javascript function below:
Thanks in advance.
Pratyush
I have created a grid in which three text boxes. the first text box is pre filled and second textbox will be manually fill and the third text box is having the result of first and second textbox calculated value.
If the first textbox have value 2 and second text box having value 1 then the third textbox have value(firsttextbox - secondtextbox) i.e. (2-1=1).
i have created a javascript function below:
Code: Select all
My problem is that this function is not called on onChange event and how can i find the value of i when i call this function(getGridField("BOQGrid", i, "DiffCoppOneQty").onchange = DiffCopperOneQtyGrid;)function DiffCopperOneQtyGrid() {
//G.alert("hi");
var tot = Number_Rows_Grid("BOQGrid", "CooperPipeOneQty");
for (var i = 1; i <= tot; i++) {
getGridField("BOQGrid", i, "DiffCoppOneQty").value = getGridField("BOQGrid", i, "CooperPipeOneQty").value + ' ' -
getGridField("BOQGrid", i, "M_CooperOneQty").value;
}
}
getGridField("BOQGrid", i, "DiffCoppOneQty").onchange = DiffCopperOneQtyGrid;
Thanks in advance.
Pratyush