Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Re-Stating method after packing grid table
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01173909
Message ID:
01174424
Views:
9
>>In VFP8 and later you can use Bindevent() instead of puting code in the headers.
>>
>>>I have a grid with code in each header click method. But when I pack the table it looses the header click method. I can restore the grid properties, but how do I restore the click method in code?
>
>Sergey,
>
>I found the idea of using Bindevents on grid controls very interesting since I have a grid class with code stuffed into each and every column (header and textbox1.)
>
>I'm stumped. I tried working with Bindevent() with grid column headers and the grid column textbox and I cannot get a reference to the actual column with information like controlsource.
>
>For example, if I want to bind to the click event of the header in order to sort the data in the grid by that column I need the controlsource of that column, but if there is no way to get at that column object then it's a no go.
>
>And I've fiddled with the use of code like this:
>
>lo2 = EVALUATE("m.loActiveControl.Columns(m.loActiveControl.ActiveColumn)."; + m.loActiveControl.COLUMNS(m.loActiveControl.ACTIVECOLUMN).CURRENTCONTROL)
>
>but still cannot touch the column object. The active column doesn't activate when clicking a different column header.
>
>It's all very interesting, but I don't think you can avoid putting code into each and every column (header and textbox1) if you need to access the current activecolumn object. At least those are my findings.

See the example from my grdSorting class, where I used BindEvents (originally I got these ideas from Barbara Peisch) Re: How to double-click on a grid, to get it's cell value Thread #1108948 Message #1108953
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform