Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check to Know if there is a Grid on a form
Message
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:
01075694
Views:
17
>>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

Definitely not tested since it has two lparameters statements. Just kidding <g>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform