Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a Smart Grid with look up drop boxes
Message
From
19/05/2009 03:31:24
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01400456
Message ID:
01400571
Views:
171
>>>>Hello All,
>>>>
>>>>I am new to the UT and a intermediate (at best) VFP9 programmer so bare with me. I am trying to create a "Smart Grid" where the end users can enter data directly into the grid with intellegent look up drop down boxes in the grid. Any examples or suggestions out there? Thanks in advance to your help.
>>>>
>>>>Sincerely,
>>>>
>>>>John
>>>
>>>I thought about myself that I am a level up than intermediate user (this is just my thoughts, no need to be true :o)))
>>>And I suggest you NOT to use Grid for this.
>>>Grid is good when you SHOW data but it turns to a nightmare when you try to use it for data editing.
>>>It is very hard to validate data when you use Grid.
>>>So use grid when you want to show the data and use separate form for editing it (Add new records and edit old ones). Deleting records is easy,
>>
>>I was just telling John that most of the experts (not all of them - Cetin if I recall doesn't not object direct editing in grids) would advise avoiding direct Grid Data Entry.
>
>Direct data EDIT in grid can be used IF you don't care about the value of the filed.
>Like Name of some item, you don't know what the user can be used as name of it so you can't control it. but for vital info my opinion is NO! Grid is one of the worst controls (I don't know which I hate more Grid,Combo or Combo in Grid) :-))



True when you do direct edits on actual data. I don't like direct grid inputs/edits eighter, but users just love them!

However, you can do quiet nice solution, if you simply introduce buffer cursor acting as clerance house between grid and real data.

Grid is bound to this cursor, where you let users do fast entries, even using auto-add , which you then validate behind the scenes
via simple scan/endscan loop and mark (highlight) wrong columns/rows accordingly.

So if it is one2many situation you simply create cursor that holds many side and every time row (and/or col) changes you validate
all records and fields in the same time. So, for as long as there is any red highlighted row/columns, no save is alowed.
If every column/row validated ok, then on some central save-bttn, you 'post' changes to real table.

It needs some bit of fine tunning, reliable record comparison funcs, and smart business object driving it all from behind the scenes,
but then can work very well.

Having said all this, I must admit that I mostly use one 'middle ground' solution where keypress in grid textbox (enter) invokes container with 'normal' fields to overlap grid (row) and then user edits record in the same space but actually on much easier manageable ground (container). It is much faster then raising edit form every time.
Reason for having it this way is exactly my own skepticisam on direct grid input which I had in the past {g}.
By now I have build myself support stuff for this kind of situations, so it is easier for me, but above described solution could do
just as good or even better.

Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform