Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GRID - Adding Code to Header Click for code added cols
Message
From
11/10/2001 18:53:04
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
11/10/2001 18:07:07
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00567291
Message ID:
00567317
Views:
14
>I have a classed grid which has 10 columns many of which are sortable, and I would like to be able to sort on some columns which are added programatically to this grid. Normally the code for this would go in the header click, but I have no way of accessing the Header Click event when these columns are added programatically. Does anyone have a workaround?

Define a header class in the .prg; in the code, after adding a new column, column.Newobject("hdr1","yourheaderclass","your.prg"). This will automatically delete your old header. You may want to column.hdr1.name="header1" if your code expects such a name. The trick is that you can't add an objet named Header1 while the old one still exists, but you can add a header with any other name.

The header class should have all the code in it, of course, but you probably have that code in the existing columns already. Just make it generic enough to be able to apply it to any column it may appear in.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform