Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Reassign methods in a Grid???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00280329
Message ID:
00280344
Views:
10
>>Hi Washington,
>>
>>>My grid is loosing its properties when I recreate it recordsource property. Also, its loosing the code that I have assigned to some of the events in some of the columns. How do I reassign them programmatically??
>>
>>There is a trick to this, before changing your RecordSource, set it "" then you can set it to the new source and all will not be lost.
>
>Hi Mike,
>
>Thanks for the tip, But it still not what I want. I have code in the dblclick method of a textbox in a grid. I the code in the dblclick event does not fire after I reset the recordsource.
>
>Any ideas? Thanks in advance

This case you should take double pre-caution. Recordsource trick is not enough here. Another way is to use 'permanent' recordsource (read-write cursor). You may CREATE CURSOR in form.load event. Then you will assign it as grid recordsource (in grid.init event) and repopulate the cursor when it's necessary, e.g. APPEND FROM or by consequent SELECT INTO ARRAY ... and INSERT .. From Array
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform