Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Action code in a Method for dynamically defined Grid
Message
From
16/02/2005 14:07:45
Freddie Rodrigues
Bitrun Business Solutions
Mumbai, India
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00987097
Message ID:
00987586
Views:
62
Here's the code after your help. It does run & design the Grid.

What I need is that the Valid function should run while I am excessing Fields in the Dynamic Grid. It now seems that the Valid runs while the Grid is dynamically designed.


In [BeforeRowColChange]
LPARAMETERS nColIndex

do SelfRGrid with '3','2' in udsnvsm

sele (mDSGrid)
Thisform.pageframe1.page1.coloursgrid1.RecordSource = "&mDSGrid"
Thisform.pageframe1.page1.coloursgrid1.ColumnCount = mnColumnCount
Thisform.pageframe1.page1.coloursgrid1.Removeobject("Column1")

Local mNowCount,mColumnWidth,mColumnValid,mColumnCaption,mColumnAlignment
FOR mNowCount = 2 to mnColumnCount
    mColumnName = "Thisform.pageframe1.page1.coloursgrid1.Column" + ALLTRIM(STR(mNowCount))
     WITH &mColumnName
          .AddObject("MyText1","MytextBox")
          .RemoveObject("Text1")
          .CurrentControl       = "MyText1"
          .MyText1.Visible      = .t.
          .Width                = mDimColumnWidth(mNowCount)
          .MyText1.ValidRoutine = mDimColumnValid(mNowCount)
          .Header1.Caption      = mDimColumnCaption(mNowCount)
     ENDWITH
NEXT
sele (gridsmry)
Helping hands are better than praying lips.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform