>Sorry about vague title.
>
>I have a grid. When the grid is built in code I want one of the columns to have checkbox class instead of textbox. So I remove the textbox and add a checkbox-based class:
>
>
>.RemoveObject( "Text1" )
>.AddObject( "print_it", "chk_select_to_print" )
>
>
>The following is the code that defines the "chk_select_to_print" class:
>
>
>DEFINE CLASS chk_select_to_print AS CHECKBOX
>
> PROCEDURE InteractiveChange
>
> if this.value
> * my code goes here
> else
> * my code goes here
> endif
> END PROCEDURE
>
>ENDDEFINE
>
You didn't forget to set column's sparse property to .f. and set this.column3.print_it.visible = .t., right?
And you're sure, that the checkbox has logical value (because it's often 1/0 rather than .t./.f.). Finally you may put your code into valid event.
If it's not broken, fix it until it is.
My Blog