Topic: transfer from tablegrid
From the table I would like all the names that are selected from the checkbox to be transferred to the memobox when pressing the button
My Visual Database → General → transfer from tablegrid
From the table I would like all the names that are selected from the checkbox to be transferred to the memobox when pressing the button
Hi,
Try it like this (see attached).
I'm guessing that there are probably two ways you might want to see the selected rows in the memo fields (one per line or comma delimited) so both options are in the script.
Regards,
Derek.
Thank you Derek. To understand it can you please explain what the followin line means if form1.tablegrid1.cell[0,vi].asboolean = true (asboolean) and also the form1.tablegrid1.cell[1,vi].asstring (asstring). Thank you in advance. Yo know if you do not ask then you will never learn.
Hi,
if form1.tablegrid1.cell[0,vi].asboolean = true (asboolean) and also the form1.tablegrid1.cell[1,vi].asstring (asstring).
Basically, when you query the contents of an individual cell in a tablegrid, you need to specify 3 things
1. which column the cell is located in (in your example, this is column 0)
2. which row the cell is located in (in your example, this is the variable 'vi').
3. what data type the cell contents contains (boolean, integer, datetime etc etc). All cells are presented as strings in the tablegrid so, because a checkbox is a 'boolean' field, you need to specify '.asboolean' in your script if you want to perform some action on it.
Have a look at the amended example; tick a couple of the checkboxes in the tablegrid and then click the 'all the checked' button and you can see the different data types being displayed in the 'message box' as you move through the tablegrid.
There are (as always with MVD) other ways of copying cells from the tablegrid to an edit or memo field that don't involve using the 'checkbox' - it all depends on what you are doing and how you want your application to flow.
I hope this makes things clearer.
Derek.
My Visual Database → General → transfer from tablegrid
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi