Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event code does not fire in grid
Message
From
07/11/2005 16:19:23
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01064326
Message ID:
01066197
Views:
20
Boris

Please excuse the late response to your reply. Your response verified what I suspected, I just didn’t know why. In my opinion, this is quite a serious flaw in VFP. Is MS addressing this issue in Sedna? I employed Andy’s solution to the problem, but it is not working. I build all my grids with code and rebuild them on an as needed basis. An example is provided below. Perhaps this is the problem. I use the same grid to display different sql queries or tables. A lot goes on in my frameWork that could be affecting it. I will setup a grid in a sterile environment devoid of all the other “noise” and see if I can get it working. If that functions, I will work backward into my framwork. If you have any other ideas, Let me know. The event code is of course readOnly and can't be added at runtime, or can it??.

Thanks a lot. You provide a great service to this board.

Vince
WITH &gActiveForm .grdItems
    LOCAL grdAlias 
    PUBLIC x
     .recordsource = gridSource 
    DO case
       CASE UPPER(gridSource) == UPPER('"curPoItems"')
            *** cursor created when the PO is selected from cboPO list on add
            SELECT curPoItems
            grdAlias = "curPoItems"
       CASE UPPER(gridSource) == UPPER('"curInvItems"')
            *** cursor created to display existing invoice line items for a given Invoice when add New is selected
            SELECT curInvItems
            grdAlias = "curInvItems"
       OTHERWISE 
            .linkMaster = "apInvMast"
            .childorder = "invKey" && invNum
            grdAlias = "apInvItems"
   ENDCASE 
   DO setGridGlobalProperties IN GridProcs
    .deleteMark = .F.
     x = 0&& grid index  

    x=x+1
    IF grdAlias = "curPoItems"
      .columns(x).controlSource = "&grdAlias .poLine" && field ID
    ELSE 
      .columns(x).controlSource = "&grdAlias .invLine" && field ID
    ENDIF 
   .columns(x).header1.caption = DBGETPROP("apInvItems.invLine","FIELD","CAPTION")

    x = x+1
   .columns(x).width = 80
   .columns(x).controlSource = "&grdAlias .shopOrder"
   .columns(x).header1.caption = DBGETPROP("apInvItems.shopOrder","FIELD","CAPTION")

     x = x+1
    .columns(x).readonly = .F.
    .columns(x).width = 100
    .columns(x).controlSource = "&grdAlias .authNum"
    .columns(x).header1.caption = DBGETPROP("apInvItems.authNum","FIELD","CAPTION")
.
.
.
ENDWITH
Previous
Reply
Map
View

Click here to load this message in the networking platform