Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double Click Event wont work on grid
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00510474
Message ID:
00510944
Views:
10
Vlad,

Ronnie sent me his classlib and the grid in question was placed in container (it's a class) and Grid refresh method contains assigning controlsource and currentcontrol for each column. Obviously, this is the main problem.

It should be set once in design time or it should use your suggestions from the FAQ, but not in the Grid.Refresh method.

>Hi!
>
>Ronnie, this way you get a pure grid reconstruction behavior when all controls and their code are lost. Read FAQ#8019 for details. Grid MUST have record source when you create it, evnet if it is empty. Otherwise, current alias will be used as a record source and grid will be reconstructed just when initialized. You can also make a nothe solution - add controls to grid in run-time. Make a text box class that runs some code on Double Click event. In run-time add new textbox based on that class to the columns of grid using Grid.Columns(i).AddObject() method. Do not forget to set Visible proeprty of new objefct to .T. after adding in run-time, do not forget to set Visible property to .F. for original (default) text box you will remove from the grid. There are samples somewhere in the FAQ, as far as I remember, or in the message pointed by Cetin.
>
>Finally, Double Click might not work also if the Click event contains a lot of code. That code lasts too long time to catch the second click on the control and fire double click.
>
>HTH.
>
>>In the init method of my form i do the following
>>
>>=.addobject('ogrid1','gridorders')
>>=.ogrid1.grid1.refresh() &&in the refresh() method I set recordsourcetype
>> and header names etc
>>thisform.ogrid1.visible = .t.
>>
>>Ronnie
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform