WITH thisform.mySpecialCoolGrid
  .Column1.Datasource=blah
  .Column2.Width=123
ENDWITH && thisform.mySpecialCoolGrid

Or you can set a local variable reference in your method code to refer to the 
grid that's buried in page3 of a pageframe, etc.

m.loGrid=thisform.pageframe1.page3.mySpecialCoolGrid
WITH m.loGrid
  .Column1.Datasource=blah
  .Column2.Width=123
ENDWITH

Or you can have a form level property that stores a reference to your form grid 
and set it in the form INIT.

Thisform.gridref= thisform.pageframe1.page3.mySpecialCoolGrid
<other init code>

I do something similar to this where I've subclassed my baseform class as 
baseformwithgrid. It has a bunch of properties and methods in the form 
container that I need to make various bits of grid magic happen. If I know a 
form is going to use a grid I create the form based on that subclass.

Is that what you're looking to achieve?

--
rk

-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Gene 
Wirchenko
Sent: Wednesday, November 06, 2013 5:34 PM
To: [email protected]
Subject: Wish: thisgrid

Dear Vixens and Reynards:

      In my kludging about making grid work as I need it, I have been putting 
properties in the containing form because thisform is convenient way to refer 
to them.  The properties probably belong in the grid class (though I may change 
my mind once I start dealing with non-grid controls on the form).

      Is there an easy way to refer to the grid control that contains a input 
control, or do I need to traverse the hierarchy to find the grid?  (Whether I 
do so when I need the property value or whether I pass the reference when 
instantiating the input controls, I expect I will have to do a traversal at 
some time.)


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD044228EE8EEB8@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to