Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dblclick in grid with temporay cursor as recordsource ??
Message
 
 
À
10/05/2001 10:03:42
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00505754
Message ID:
00505759
Vues:
22
Hi!

With the ColumnCount=-1 grid is reconstructed at run-time before display data, so all code, custom controls and preoprty settings are lost. When you still want to use COlumnCount = -1, You require to make some programmatic actions after grid is initialized (better do this in the Init event of the grid). In your case you require to define a custom control class that you will use to display data in the grid instead of the default textbox. Add this textbox to the grid and remove the default text box. In the class in the DblClick event call the function you want. You can do it even more generic, if you want.

>Hi foxpro professionals ! Is anyone out there who can help !
>I am working in germany, so please apologize my poor englisch.
>
>
>In my application the users first get into a selection form with serveral search fields and a grid to show the records they look for!
>
>the grid is readonly = .T., recordsource = , columncount = -1
>
>At the keypress event of the search fields i allways do some sql-selects like:
>
>select a,b,c,d,e,f from table1,table2,table3 where table1.field = searchfield.value into cursor xyz
>thisform.grid1.columncount = -1
>thisform.grid1.recordsource = "xyz"
>
>The users have to click on the row of the grid with data they wanted to work with, to mark the record and then click on a command button to get into another form nnn where they can change or delete or ... the data!
>At the click event of the command button i do:
>do form nnn with xyz.keyfield
>
>I am looking for a way to start the second form nnn at the dblclick event of the grid !!
>(dblclick on a row !! whatever the column is !)
>
>This works if i use a grid with columncount = n (not -1) , define the captions of the column headers and put the code to call the second form at the dblclick event of the objects in all columns (textboxes)
>
>The dblclick event of the grid with columncount = -1 seams to be ignored if they dblclick on a filled row in a grid , only if they dblclick on an empty row in the grid ,the code is excecuted.
>
>What am 1 doing wrong ??????
>
>Albert Beermann
>
>
> '''
> '''''
> (0 0)
> +---------oOO---------(_)------------------+
> | Mail: mailto:a.beermann@piepenbrock.de |
> | Internet: http://www.piepenbrock.de |
> +---------------------------------oOO------+
> |__|__|
> || ||
> ooO Ooo
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform