The form has a DB Grid and several push buttons.
The DB Grid has several columns: LastName, FirstName, Address & City.
It has an On DB Grid Cell Click EEP: Button.EEP using 'GridEdit'.
Button.EEP is Razzak's:
SET VAR vButton = .%1
CLOSEWINDOW
RETURN
So upon a cell click, the form closes and returns to the command file and the DB Grid click is treated like any other button click.
Then it's a matter of checking vButton to see what was pushed/clicked.
IF vButton = 'GridEdit' THEN
IF RBTI_DBGRID_COLUMN = 'FirstName' THEN
EDIT USING EditPeople +
WHERE PeopleID = .vPeopleID
ELSE
EDIT USING EditFamily +
WHERE FamilyID = .vFamilyID +
AS EditFamily
ENDIF
ENDIF
I do this to edit a specific person in a family if the first name is clicked or edit the household if any other column is clicked.
Hope this helps.
Regards,
Doug
Dawn Oakes wrote:
Brad You can't perform a PROPERTY or GETPROPERTY command on any object that does not have a component id. BUT, not too long ago someone (don't remember who) on the list suggested using the RBTI_FORM_COLNAME variable in an on exit from db grid column eep to extract which column the user has just left. You could also use RBTI_FORM_COLVALUE system variable to see the value in the column. So something like:Set var vcolumn = .RBTI_FORM-COLNAME If vcolumn = whatever THEN SET VAR vvalue = .RBTI_FORM_COLVALUE Endif Hope that helps you. Dawn -----Original Message----- From: Brad Davidson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 15, 2005 3:26 PM To: RBG7-L Mailing List Subject: [RBG7-L] - Re: RBTI_FORM_COLVALUE I had written earlier in the same regard with equivalent logic in pulling data from a row in a DB Grid. No replies as of yet. Since a component ID is not available to DB Grid columns, how might one accomplish similar action as a GETPROPERTY TEXTVALUE, other than converting to scrolling region tab form?? Appreciate any guidance in this. -Brad Davidson -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence Lustig Sent: Tuesday, February 15, 2005 7:47 AM To: RBG7-L Mailing List Subject: [RBG7-L] - Re: RBTI_FORM_COLVALUEAm I doing something wrong?Marc, I don't know if you're doing anything wrong, but you might find it faster if you use the "newer" programming construct GETPROPERTY TEXTVALUE. That will get the data directly out of the edit field. RBTI_FORM_COLVALUE was great in its day, before we had the ability to directly interact with the properties of each control. It is, however, subject to certain unknowable (to us programmers) issues like "when is the information from the edit field put into the column value?". Try GETPROPERTY -- it's more flexible and you'll know exactly what to expect. -- Larry
