Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid problem
Message
 
À
12/01/2001 22:44:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00462038
Message ID:
00463335
Vues:
29
>Drury,
>Maybe my questions are confusing, let me make clear on this.
>I have a form, the form consists of five textboxs and grid (which I made it programmatically ), the first to fourth textboxts is placed above the grid and the fifth textbox is placed under the grid, the first textbox is the searching key so if the searching found the data will be displayed on the grid, and
>the problem is that if I click one of the record on the grid (i.e: a cust_code) then I want the cust_name to be displayed on the fifth textbox. Clear enough ?
>Actually, this is just a problem of how do we define the record that we click or doubleclick from the grid, since the grid that I make is programmatically not from the wizard.
>thanks
>
>budianto_M
>~~~~~~~~~

Hi Budianto,

Generally, you may have a code which updates the textbox content code in a grid AfterRowColChange(). I don't know why you need to create the grid programmatically instead of placing it on the form at design time (which might or might not be an option). But since you do it this way and cannot add the code in AfterRowColChange event, seems like it is a job for my Click-Transparent controls (see December 2000 FoxPro Advisor).

Basically what you do is:
You cover the grid with an instance of the the Shape or Container class which is able to pass the clicks through to the underlying control (grid in your case). The code which updates your textbox may be placed in the container method, so it will work with any grid you programmatically place under it. It can react to click or double click (any kind of click, actually). The click-transparent control does not block your grid from editing. You may download my samples from FPA site: http://www.advisor.com/Articles.nsf/aid/NEKLN01
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform