Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check to Know if there is a Grid on a form
Message
 
To
07/12/2005 04:56:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01075610
Message ID:
01075623
Views:
21
>HI BORISLAV ,
>
>How can I know if there is a control Grid on a form or not ?
>
>Best regards
** Somwhere in your form
IF thisform.CheckForGrid(this)
   MessageBox("There is a grid")
ENDIF


*** Method CheckForGrid
LPARAMETERS loObject
LPARAMETERS lnFor
DO CASE
   CASE UPPER(loObject.BaseClass) $ [FORM PAGE CONTAINER]
        FOR m.lnFor = 1 TO loObject.ControlCount
            IF thisform.CheckForGrid(loObject)
               RETURN .t.
            ENDIF
        NEXT
ENDCASE
RETURN (UPPER(loObject.BaseClass) == "GRID")
Something like that, but not tested at all
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform