Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Header Click - How to do
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01419010
Message ID:
01419013
Views:
63
>>Thanks for the answers about grid header colouring.
>>Now, I want code to execute in the header.click event.
>>
>>I build the grid in code, and the underlying results can change. If they change, any code that I added in the clikc event of the header goes way. I need to trap the click and execute some code if user selects it.
>>
>>How do I add code to the grid header after it is created?
>>Mike
>
>You can use BINDEVENTS()

I don't fully understand that. This is what i.ve tried.
	WITH .column6
		.ALIGNMENT=0
		.CONTROLSOURCE=lcSource+'.'+'adjUnits'
		WITH .header1
			.CAPTION='Adj Units'
			.ALIGNMENT=7
			.BACKCOLOR=RGB(255,255,128)
			BINDEVENT(this,'Click',thisform,'GetAdjUnits')
		ENDWITH
		.BACKCOLOR=RGB(255,255,128)
		.WIDTH=60
	ENDWITH
This is a snippet of code from a method in the grid called setgrid. This is called after the data is gathered prior to populating it. It is also called after the grid is empty to keep the grid visinle and looking the same as opposed to an empty box.

I guess I need a bit of a hint on how to use bindevents

TIA,
Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform