>******************************************************************** >* Description.......: GridBuilder - allows to build a grid in design-time >* Calling Samples...: >* Parameter List....: >* Created by........: Cetin Basoz >* Modified by.......: Nadya Nosonovsky 10/25/2001 04:14:31 PM >******************************************************************** >*custom builder not registered >aselobj(arrObj) >for each oObj in arrObj > if upper(oObj.baseclass)='GRID' > for each oColumn in oObj.columns > with oColumn >* .name = "col"+proper(justext(.controlsource)) > > if .name = 'Column2' and type('oColumn.text1')="O" and lower(.text1.baseclass)='textbox' .newobject('newtext1','EditInGrid','nAdditions.vcx') .removeobject('text1') .newtext1.name="text1" > > endif > > endwith > next > endif >nextIt did delete the control, and recreated it right away. A column can't exist without a current control, so when you remove that one, it creates a new one automatically. So you should add your new textbox first, then kill the old one, and (optionally) rename it to text1 (if your code mentions the name anywhere).