Jim, Here's a simple outline on using Drag and Drop between two MDI forms. Forms named DRAGIT ALIAS grid1 and DROPIT ALIAS grid2 Each has an enhanced DBGrid componentID G1 and G2 on GRID2 form respectively with a common ID
DRAGIT form alias grid1 DRAG eep GETPROPERTY g1 TEXTVALUE variable RETURN Also on form DRAGIT place an EEP to fire when you leave the grid on MOUSE LEAVE SETFOCUS grid2 RETURN This gives the dropit MDI form focus so that it refreshes. DROPIT form alias grid2 DROP eep APPEND tablename1 TO tablename2 WHERE commonID = .variable PROPERTY TABLE tablename2 REFRESH PROPERTY RBASE_FORM REFRESHLIST TRUE RETURN To fire both forms use EDIT USING dragit MDI as GRID1 EDIT USING dropit MDI as GRID2 RETURN If you have related DBgrids on the same form you'll only see the one row which has focus in the second table because of the relational connection between the two tables so using two forms allows you to see all drag and drop rows. Naturally you can expand the code to process your requirements but this is just the basics of moving data between two forms. Hope this points you in the direction you need to go. There are countless ways to use Drag and DROP functions on many components but this is one simple one. On Tue, Jan 19, 2021 at 10:47 AM Tony Luck <[email protected]> wrote: > It'll do that until you drag over to the drop area, then will change to a > small rectangle. I'll put together a more detailed example for you today > (its 11 am Tuesday) > > On Tue, Jan 19, 2021 at 10:43 AM 'Jim Belisle' via RBASE-L < > [email protected]> wrote: > >> Now it comes up with the circle with a / in it designating I am unable to >> drag the info. >> >> The code in the drag is working because it is populating some var. >> >> So now figuring out the DROP code. >> >> Enough for tonight. >> >> >> >> James Belisle >> >> >> >> *Making Information Systems People Friendly Since 1990* >> >> >> >> *From:* [email protected] <[email protected]> *On Behalf >> Of *Tony Luck >> *Sent:* Monday, January 18, 2021 6:10 PM >> *To:* [email protected] >> *Subject:* Re: [RBASE-L] - new to drag and drop >> >> >> >> On the DRAG eep the GETPROPERTY will get the unique value and store it to >> Vvariable (ensuring your first column is the unique ID for the row) >> >> >> >> GETPROPERTY grid1 TEXTVALUE Vvariable >> RETURN >> >> >> >> In the DROP eep process the row based on the unique ID i.e. >> >> >> >> APPEND tablerow TO newtable where uniqueID = .Vvariable >> >> >> >> This will DROP the row to the other table. Use the property commands to >> refresh table or list depending on what process you need to carry out. >> >> Hope this helps out.. >> >> >> >> On Tue, Jan 19, 2021 at 9:04 AM 'Jim Belisle' via RBASE-L < >> [email protected]> wrote: >> >> Okay. I was able to do that with this code >> >> GETPROPERTY comp_pneed VISIBLEROWCOUNT 'vcr' >> >> >> >> Then I want to >> >> SELECT values (7 of them) >> >> INTO variables (7 of them) >> >> FROM schedneeds >> >> WHERE ? = .vcr >> >> >> >> The WHERE part is what I am not sure of. I have the variable but what >> word represents the whole row I just chose. >> >> >> >> James Belisle >> >> >> >> *Making Information Systems People Friendly Since 1990* >> >> >> >> *From:* [email protected] <[email protected]> *On Behalf >> Of *Buddy Walker >> *Sent:* Monday, January 18, 2021 4:53 PM >> *To:* [email protected] >> *Subject:* RE: [RBASE-L] - new to drag and drop >> >> >> >> You should be able to set a variable for the uniqueID row you click on. >> Then right your code as to what you want it to do >> >> >> >> >> >> >> >> *From:* 'Jim Belisle' via RBASE-L <[email protected]> >> *Sent:* Monday, January 18, 2021 5:42 PM >> *To:* [email protected] >> *Subject:* RE: [RBASE-L] - new to drag and drop >> >> >> >> I have that part, Buddy. I just do not know how (code wise) the row is >> grabbed. Some code has to be able to distinguish one row from the others. >> That is where I am stuck. I do not see a PROPERTY command that helps me >> identify a specific row in the DBGrid. >> >> >> >> James Belisle >> >> >> >> *Making Information Systems People Friendly Since 1990* >> >> >> >> *From:* [email protected] <[email protected]> *On Behalf >> Of *Buddy Walker >> *Sent:* Monday, January 18, 2021 4:38 PM >> *To:* [email protected] >> *Subject:* RE: [RBASE-L] - new to drag and drop >> >> >> >> *CAUTION:*This is an EXTERNAL EMAIL, *STOP!* and think before clicking >> on any links or opening attachments. >> >> Jim >> >> Right click on DBGrid then enable Drag and Drop should be near the >> bottom. You will see Start Drag (EEP) and Drop Drag (EEP) >> >> Buddy >> >> >> >> *From:* 'Jim Belisle' via RBASE-L <[email protected]> >> *Sent:* Monday, January 18, 2021 5:05 PM >> *To:* [email protected] >> *Subject:* [RBASE-L] - new to drag and drop >> >> >> >> I am new to drag and drop so not sure how to “GRAB” a row from a DBGrid. >> >> The DBGrid is in the row select mode so I can grab a row. >> >> Also the record count on the left is on so I have the row number. >> >> How does one identify the specific row you want to grab? >> >> In RDOCS I do not find a PROPERTY command to grab the record number of a >> row. >> >> >> >> James Belisle >> >> >> >> *Making Information Systems People Friendly Since 1990* >> >> >> >> -- >> For group guidelines, visit >> http://www.rbase.com/support/usersgroup_guidelines.php >> --- >> You received this message because you are subscribed to the Google Groups >> "RBASE-L" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rbase-l/CH2PR02MB6821ED4691F176CAAA1B22FDA0A40%40CH2PR02MB6821.namprd02.prod.outlook.com >> <https://groups.google.com/d/msgid/rbase-l/CH2PR02MB6821ED4691F176CAAA1B22FDA0A40%40CH2PR02MB6821.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> For group guidelines, visit >> http://www.rbase.com/support/usersgroup_guidelines.php >> --- >> You received this message because you are subscribed to the Google Groups >> "RBASE-L" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rbase-l/CH2PR02MB68214D59477F2F7AA282476FA0A40%40CH2PR02MB6821.namprd02.prod.outlook.com >> <https://groups.google.com/d/msgid/rbase-l/CH2PR02MB68214D59477F2F7AA282476FA0A40%40CH2PR02MB6821.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> For group guidelines, visit >> http://www.rbase.com/support/usersgroup_guidelines.php >> --- >> You received this message because you are subscribed to the Google Groups >> "RBASE-L" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rbase-l/CH2PR02MB682104A0FAAF8B744DA4C005A0A40%40CH2PR02MB6821.namprd02.prod.outlook.com >> <https://groups.google.com/d/msgid/rbase-l/CH2PR02MB682104A0FAAF8B744DA4C005A0A40%40CH2PR02MB6821.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer> >> . >> >> >> >> >> -- >> >> Regards >> Tony >> >> -- >> For group guidelines, visit >> http://www.rbase.com/support/usersgroup_guidelines.php >> --- >> You received this message because you are subscribed to the Google Groups >> "RBASE-L" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rbase-l/CABnhDATF-0PJnkA7bjbp3_iS%3D0mbg1SoGEabDLoedWwFK_LqxA%40mail.gmail.com >> <https://groups.google.com/d/msgid/rbase-l/CABnhDATF-0PJnkA7bjbp3_iS%3D0mbg1SoGEabDLoedWwFK_LqxA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> -- >> For group guidelines, visit >> http://www.rbase.com/support/usersgroup_guidelines.php >> --- >> You received this message because you are subscribed to the Google Groups >> "RBASE-L" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rbase-l/CH2PR02MB682152E575E79E84AD5D6A26A0A30%40CH2PR02MB6821.namprd02.prod.outlook.com >> <https://groups.google.com/d/msgid/rbase-l/CH2PR02MB682152E575E79E84AD5D6A26A0A30%40CH2PR02MB6821.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Regards > Tony > -- Regards Tony -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/CABnhDARaknbF__0M4mWNbM%2BpeTNwy8LqJkqhr7s2uO_LxKK-FA%40mail.gmail.com.

