>We have a grid whose record source is a view. Some of the columns are built at design time and others are added at run time.
>
>The problem we're having has to do with enabling and disabling a textbox control in column B based upon the checkbox control in column A. Clicking on the checkbox in a specific row will take care of the textbox just fine. However, when changing rows in the grid we cannot get the enabling/disabling to work reliably based on the value of the checkbox in column A within the current row.
>
>Any ideas?
Your enable/disable should be based on a field in the table. The regular way is to have two textboxes in the column, one enabled and one disabled (I've named them txtrw and txtro), so you actually wouldn't need any enabling/disabling code. Just set sparse property for that column (can't remember which value is which - try either one), and set the dynamiccurrentcontrol=[(iif(table.lField, "txtrw", "txtro"))], so if table.lField=.t. it'll use the readwrite and viceversa.
Another thing with checkboxes in a grid affecting other columns is that I've seen some delay - often it may require the checkbox to lose focus for changes to be visible. One way around it is to have code like this in checkbox.click (or checkbox.interactivechange):
nodefault
replace table.lField with not table.lfield
this.value=table.lfield
Another trick is to have this.value=this.value somewhere in checkbox's code (click, refresh, interactivechange, valid...), which somehow forces the writing of its value into its controlsource.
Try these tricks one by one, some of it should work.
Obviously, last time I had a problem like this, I tried several and now can't remember which worked and where was it :).