Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editing in a grid
Message
From
28/02/2007 12:21:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01199463
Message ID:
01199664
Views:
25
>>>Hello all
>>>
>>>I'm posting this to possibly save me a load of experimenting and having to find things out the hard was, i.e. I don't want to re-invent the wheel.
>>>
>>>I've never allowed add/delete/edit of records in a grid before as there's never been the need, and I think it's messy and dodgy. I'm remaking an old DOS system and need to emulate the wauy the users are used to, adding records in the "many" table, via a grid, on a separate page from the "one" table, in a one-to-many reln.
>>>
>>>Now, if they're editing recs in the grid, then OK, let them nav up and down and change what they please.
>>>But, if thye're adding a new rec then they need to stay focused on the current rec and not be allowed to stray.
>>>How do you stop grid nav in such a situation? The only way I can see, at first thought, is using code in the BeforeRowColChange event.
>>>
>>>However, there are those of you out there who have doubtless tackled this problem, so I was seeking some input/guidance/tips and/or pointers.
>>>
>>>'ppreciate it
>>>
>>>Terry
>>
>>Terry,
>>You can do that with code in BRCC and Valid events. However you might also propagate the check to the table itself (if it's part of a dbc) by entering an table rule.
>>Cetin
>
>Thanks, Cetin.
>
>So my assumption is correct about doing it in BRCC(). I can't make dbc rules as these are free tables, still used in a fpd system.

Yes in BRCC. However you'd need to do some coding in Valid too (if you don't invent a better way than I did:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform