|
| Simplified Drag & Drop with Tables |
| Iniciado por VEGEboss, 10,oct. 2019 12:47 - 1 respuesta |
| |
| | | |
|
| |
Miembro registrado 88 mensajes |
|
| Publicado el 10,octubre 2019 - 12:47 |
hello folks
I have 2 tables in the same Windows and I have activated the DnD Source on the Table A and the DnD Target on the Table B
When I drag row(s) from A to B I correctly get a copy of the data in the second table
The question is: can I know HOW MANY rows are passing from A to B to automatically change some data in the B tables?
If I put some code in the "Drop in Target" Section, the rows are NO MORE COPIED and I can't understand how to workaround...
Thank you very much |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 52 mensajes |
|
| Publicado el 11,octubre 2019 - 12:53 |
Not sure if you want this:
add "DROP IN TARGET DRAG/DROP (DNDDROP) ON table_target" event and this code:
Rows_to_Drop is int = ListSelectCount(_DND.SourceControl)
Later, I saw what you meant .... OK
try this:
at "DROP IN TARGET DRAG/DROP (DNDDROP) ON table_target" event
Rows_to_Drop is int = ListSelectCount(_DND.SourceControl) FOR EACH SELECTED ROW OF TABLE_SOURCE TableAdd(TABLE_TARGET, TABLE_SOURCE[TABLE_SOURCE]) END
Notice: TABLE_SOURCE and TABLE_TARGET must have same number of columns, but you can change code to avoid this.Mensaje modificado, 11,octubre 2019 - 13:20 |
| |
| |
| | | |
|
| | | | |
| | |
|