Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2008 Server
>Hi all
>
>I'm using the BackStyle_Access method made popular by Craig Boyd and Burkhard Stiller. The method is added to a container in a column. By the way, is it only the container that makes the grid check the back_style? As you might know, the access method fires twice per row. I'm trying to avoid that, if possible. I will have to add the access method to a container that is very widely used. That means the access method will fire for every row and every column, even if I only want it for one column. It's also making tracing a bit of a pain since if I set step on, each of the calls to BackStyle_Access fires.
>
>I thought I remembered that I could BindEvent to the BackStyle property so that when the grid interrogates the value on the container in the one column, I could trigger my routine. The help says we can bind to properties. It fires the delegate if I change a property, but not when I interrogate it. Is there flag I missed? The help does not mention that interrogating a property's value will not trigger the delegate.
>
Pretty sure BindEvent() fires only on changes to properties, not on accesses. Maybe create a specific subclass of the container for use in this column? Or, to cut down the code that runs, add a property to indicate whether you want to do whatever it is you're doing with method. Set it to true for the one column and first thing in the method:
IF This.lDoThisThing
...
ENDIF
While it won't keep it from firing, it will mean just one line of code to run when it does fire.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only