>.controlsource = EVAL(toForm.myarray[i,1]) >>>Normally when I want to set a grid column controlsource to run a form method, I will do something like this:
>>thisform.myarray(1,1) = "[thisform.poform.mymethod('myvalue')]" >>>>In form 2 (called form):
>>LPARAMATERS toForm && form called by which contains the array and the method >>THISFORM.poForm = toForm >>*--An example but shows what I'm doing >>FOR i = 1 TO ALEN(toform.myarray,1) >> WITH THISFORM.grid1.Columns[i] >> lcType = TYPE(toform.myarray[i,1]) >> do case >> case lcType = "C" && this works, even with the UDF >> .width = && a computation that works >> endcase >> .controlsource = toForm.myarray[i,1] && normally this is just a field name >> * for the udf toForm.myarray[i,1] = "[thisform.poform.mymethod('myvalue')]" without quotes >> * so it does not work for udfs, it ends up the character string thisform.poform.mymethod('myvalue') >> * when the udf call is in a variable, how to set it here? >> ENDWITH >>ENDFOR >> >>>>