To use a grid (table) as file open box, do the following steps:
Use only one grid to display the csv file with read only mode
Use file handling to edit the csv file (add and remove a row)
Use the grid to display the csv file with read only mode To avoid access problems (=file could not be written, when it is displayed in the grid) activate option “Read only”
Use file handling to edit the csv file (add and remove a row) You can use WinStudio functions or VB script functions to read and write the csv file.
WinStudio functions are available on CE and PC operating systems FileReadFields(), FileWriteFields()
For VB script functions find many examples in internet, but not working on CE operating systems
To add a row append it to the end of the file. You must ensure, that the filed separator, which you have defined for the CSV file is not used in any variable you save to the CSV file.
To delete a row:
Read all rows of the file into a VB script array variable
Delete the csv file
Save all data stored int VB script array variable, but not the one you want to delete
Repaint the grid, to display the changed csv file
... View more