Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Class and custom header replacement error
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00817621
Message ID:
00817664
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
I get an error in the AddObject call stating that it is Object Name is Invalid.

First of all, you need to make sure that your prg is available by issuing a

SET PROCEDURE TO < My Prg > ADDITIVE.

Then, try this code instead:
IF NOT EMPTY( This.cHeaderClass )
  FOR EACH oColumn IN THIS.COLUMNS
    *** replace the header with custom header class
    *** created in code
    FOR EACH loObj IN oColumn.Controls
      IF loObj.BaseClass = 'Header'
        lcName = loObj.Name
        oColumn.REMOVEOBJECT( lcName )
        oColumn.ADDOBJECT( lcName, This.cHeaderClass )
        EXIT
      ENDIF
    ENDFOR
  ENDFOR
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform