Unless you're using VFP8, you can't do it very easily. You'll have to
predefine a grid with the columns you want to see, so that you can put code
in them. Either that, or you'll have to dynamically add a custom header
class to your grid after you've removed the standard one.
If you're using VFP8, you can do this easily with BINDEVENT() at runtime.
--
Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.
Quote:
> I'm trying to figure out how to accomplish the following:
> I have a form that I've added a grid control to it, which
> get populated at run using the following code.
> IF OpenFile( cFile, cAlias, nArea )
> DO FORM "C:\SOURCE\VBPF\Forms\xform"
> xForm.grid.recordSource = cAlias
> xForm.Caption = cFile
> xForm.Tag = cAlias
> ENDIF
> What I want to do is bring up a pop up menu whenever the
> user right clicks on a column header.
> I know that the column header has a rightclick event but
> since at desgin time my grid has no columns I don't know
> how to added the code.
> Thanks
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.462 / Virus Database: 261 - Release Date: 3/13/2003