Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mastering the Grid Object
Message
From
10/07/2001 22:21:27
 
 
To
10/07/2001 11:26:32
Thomas Ianuzzi
Information Security Consultants, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00528657
Message ID:
00529024
Views:
16
Thomas-

>I have a project where the result of a search is a list of one or more data items in a grid. The user should select the desired data item from the grid and use a command button to go on with processing.
>
>When there are several items in the grid the process is intuitive but, when there is only one item in the grid the user often proceeds without selecting the grid item.
>
>In concept, it seems simple enough to count the items in the grid and if there is only one item, to trigger its click event with a line like
>
>THISFORM.GRID1.COLUMN1.TEXT1.CLICK
>
>Unfortunately, this does not work. Does anyone know where to go to find out how to manipulate grid objects?

You don't say where the THISFORM.GRID1.COLUMN1.TEXT1.CLICK code is, nor do you say what you mean by "it doesn't work."

It actually sounds to me like you have design issue--tight coupling between contained objects. You usually want to minimize this in OOD.

Since you have code that you sometimes need to run from the Text1.CLICK() and sometimes from another context, I would add the functional code to a custom method on the form and then call _this_ method from the click and from the other place you have.
Previous
Reply
Map
View

Click here to load this message in the networking platform