msap
7 years agoFrequent Contributor
insert a value to new row in a grid
hi all
I am trying to insert new row in a grid using below Java script:
rowcount fronm the grid and insert the values into text boxes and combo boxes.
getting an error.
Grid row index 116 is out of bounds .
any ideas.
Grid1.ClickItem("Edit");
Grid1.ClickItem("New");
Grid2=Grid.grid
RowIndex=Grid2.wRowCount;
wRowCount = number of rows.
However, while the number of rows may be 116, the INDEX of the last row is 115. When setting RowIndex, use the following
RowIndex=Grid2.wRowCount -1;