.. and remember there's nothing wrong with anything else here since it does work when I hard code the number, even if it's the very same number as I see when using alert on last_row. I know it should say # in front of 'grid' in the selector but I just wrote a simple example here (but it's tested.. ). last_row is also set = rowid at each execution..