Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert record in grid - first row problem
Message
From
25/01/2003 09:33:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Insert record in grid - first row problem
Miscellaneous
Thread ID:
00745402
Message ID:
00745402
Views:
53
Hi everyones,

I'm working with VFP6.

I have a cursor (from an external view) which has an index (on a filed cll citemno)and is in buffering mode 5. I have a grid which is fill with the cursor.

Now suppose I already have 3 rows/records with key field being FF, TT, MM dispayed correctly in order in the grid. If I insert HH everything goes well, the new rows moves between the to first where it belong. It does that because I refresh the grid after the value as been accepted. Now the problem is if I insert a value which is smaller then any value ex: BB then the row stays at the bottom of the grid. When I insert another value, the BB rows desapear from sight, it moves to the top allright (but too late) but I have to use the scroolbar to see it even if the grid is not full. I experiment many times and the behavior is always the same when I insert something that would be on the top row.


Here the code I use to refresh the grid, it is in a method which is call when the value in the key field is valid.

This.EfrmSOrd.EpgfSOrd.PagDetail.EgrdDetail.Refresh()
This.EfrmSOrd.EpgfSOrd.PagDetail.EgrdDetail.SetFocus()
This.EfrmSOrd.EpgfSOrd.PagDetail.EgrdDetail.GrcItemNo.SetFocus()

I tried to select the cursor, go top, set focus to the grid, go back to the new record, set focus again, no luck.
I tried to set focus outside the grid before refreshing, no good.


To me it looks like a flaw in VFP, but is there a work around? At minimum I would like to know if it is feasible.


TIA,
Diane Robitaille eng.
Diane Robitaille eng.
Next
Reply
Map
View

Click here to load this message in the networking platform