Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A grid problem everyone has grown to accept.
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00691173
Message ID:
00691192
Views:
19
>The current VFP grid has always displayed the results (of a table search) in the center/middle row of the grid (instead of at the top). This has always puzzled me.
>
>The Browse window has always displays the results from the very top downwards, which I would say is much more correct.
>
>I realize that this can be achieved in a grid, using a bunch of tricky code involving Doscroll, and one has to play around with the problems of the textbox sometimes losing focus, etc. ( I have got this code working by the way).
>
>Am I the only one that finds this a pain? Has everyone else accepted this particular behaviour of the grid. (I do not see any requests for this improvement in the wishlist.)
>
>Why, some of you may ask, do you want the results displayed from the top row, instead of the center row?
>Answer: Because it wastes valuable space. Only the bottom half of the grids records are relevant. The top half of the grids records are not relevant.
>The end-users will generally type text into a search box. The results will display in the grid. If the users have typed in “Jones”, they want to see a grid full of “Jones”s, starting from the top. They are not interested in seeing the top half of a grid filled with “Jameson”s and only from the center down filled with “Jones”.
>
>I would like to see a future VFP grid having an optional property to display results either in the Center, or at the Top of a grid. It would make things so much easier.
>
>Your thoughts would be appreciated.
>
>regards
Not an answer on your question, but here is a code, which may help: (method is called LocateRecordOnTop)
*--------------------------------------------------------------------------
* -- NSL 3/2/00
* -- Added this method per Nadya's request
* -- It is not automatically called but is available if the user would like to use.
* -- It is intended to be called on return from the search button to place the intended record
* -- at the top of the grid.
* -- NSL 10/10/01  Nadya wanted to be sure that Walter Meester is appropriately credited for this change
*--------------------------------------------------------------------------

thisform.lockscreen=.t.
nHeight = this.height
this.height = this.headerheight + this.rowheight
this.refresh
this.height=nHeight
thisform.lockscreen=.f.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform