Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid refresh issue
Message
From
09/07/2003 02:35:10
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00808189
Message ID:
00808328
Views:
9
I've found the best solution. It look very "professional" too. And I can keep the search form modal.
The idea is to resize the grid so only one row to be displayed, refresh it, then simply resize it back. As a result, the current record will be displayed always in first row, nice.
*if there is a grid on calling form to be updated, ref passed as parameter
IF !ISNULL(thisform.oGridRef)
	thisform.oFormRef.LockScreen = .t.
	WITH thisform.oGridRef
		lnH = .height
		*resize the grid to display only one row
		.height = .headerheight+SYSMETRIC(8)+.GridLineWidth*2
		.refresh
		.ActivateCell(1,1)
		.height = lnH
	endwith
	thisform.oFormref.LockScreen = .f.
ENDIF
>Hi Dorin,
>We do something like this (a FIND form that searches the grid, similar with CTRL+F used on a browse), and refresh will scroll the grid and highlight the row, but not move the record pointer. Highlighting in conjunction with a text on the FIND form saying "Found" or "Not found" is good enough, for us...
>I believe you need to setfocus on the grid for the record mark to move -
Previous
Reply
Map
View

Click here to load this message in the networking platform