Not A Function Error

Anyone has the idea to solve “not a function” error from attached project.

  1. Click Load Data button
  2. Click Print button
  3. close moral form
  4. Click again Load Data button (not a function error)

Thanks

Teo

Project1.appstudio.zip (12.4 KB)

You’re trying to delete more rows than exist in the grid.

Try

Grid1.deleteRows(Grid1.getRowCount() - 1)

Not really,

if i comment out deleterow, the following statement setvalue arise “not a function” error

Any idea?

Thanks

Grids have no forgiveness if your row count is not correct. If you set a cell in a row higher than the grids last row or in a column higher than the maximum columns it will give you that error

The root cause is form2 onshow event

Container2.innerHTML=Container1.innerHTML

I solved it by adding the following statement in form2 onhide event

Container2.innerHTML=""

Thanks

Teo