Hi,
It's a lot easier if you attach your project - then it's possible to be totally sure what your problem could be.
However, in the case of this error message, it almost certainly refers to the fact that you are referencing a column in a tablegrid that doesn't exist (remember that column and row counts start from 0 and not 1).
Some general points to also consider.
1. every cell in a tablegrid is handled as 'text' (or 'string'). So if you want to display the contents of individual cells in a message box, you can do this directly without needing to use a variable or worry about converting to a specified field type (see line 9 in the script).
2. the contents of any cell can be copied and displayed in an 'edit field' because no conversion is needed (because all cells in a tablegrid are held as text, as explained above); see line 7 in the script and try changing the column no' to something else and you can see that it still works.
3. if you need to copy and display, for example, a date/time value from a tablegrid (text) in a 'datetimepicker field', you need to explicitly convert it (see line 8 in the script). This is also true for other field types.
Hopefully that makes things a bit clearer.
Regards,
Derek.