Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting row of a grid
Message
From
18/12/2001 16:07:59
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00595817
Message ID:
00595840
Views:
33
Hello Nancy.

>> I have a seven column grid with about 5,000 rows that pulls customer name, address, etc. from a cursor. Two questions, how do I highlight the whole row that is being selected and and secondly the customer wants the initial row to be selected to be the first record where lastname = 'M'. I have tried a series of "locate" commands in the INIT and it isn't quite working. <<

I assume that you are using a view for the grid's RecordSource that has a logical field called lSelected so that you can tell when the user has selected something. In this scenario, this code in the grid's Init will do it:
*** Set up for highlighting ALL Selected Rows
This.SetAll( 'DynamicForeColor', ;
	'IIF( lSelected, RGB( 0, 0, 128 ), RGB( 0, 0, 0 ) )', 'COLUMN' )
This.SetAll( 'DynamicBackColor', ;
	'IIF( lSelected, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
Previous
Reply
Map
View

Click here to load this message in the networking platform