Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid
Message
From
03/11/1997 15:56:12
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Grid
Miscellaneous
Thread ID:
00057926
Message ID:
00058043
Views:
30
>>Hi, Anybody.
>>
>>I have a problem. I want to create a form with 1 to many relationship. Now when the user wants
>> to add data, depending on a value (say x), I want to create blank records into a cursor which
>>should become the record source.
>
>The key is to create the cursor in the load event of the form. This method is executed before the grid is created, so you can, at design time link the grid to it. If you create the cursor in the init event, you will get in trouble because the form.init is executed after the creation of the grid, so the latter will not be able to find its underlying record source.
>
>I "clone" the many table using afields. If you do this, make sure that leave out field 8 to .. (I think it is 15), because otherwise you will have problems with triggers, referencial integrity and other shmiggers ...
>
>Some will say that you can achieve the same with table buffering, and they are probably right, but I'm doing it the way I described. My whole framework, is based on it.
>
>HTH,
>
>Marc

I like this method too, with one exception that I create/populate grid in Form.Init event (it's not difficult to 'tell' grid where its recordsource).
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform