>Hello Dragan!
>
>I'm here again... I tried to find a workaround, but no success...
>
>I'm creating a wizard to help me design forms. So, I need to create my grids (and columns, of course) in design mode.
>
>If you have some time, please, try to find that precious code... If you are busy, no problem!
I'm actually using a workaround. Goes like this:
In design time, I use a grid with regular columns. Set it to whatever number of columns I need, set properties to it etc.
When done, I generate code for grid's init, which will do the .newobject() for each column as we need it, while preserving any other code that may have been there. I'm actually doing
lcInit=getpem(oGrid, "init")
lcOldCode=strextract(lcInit, hPrefixLine, hPostfixLine)
lcInit=strtran(lcInit, lcOldCode, "")
oGrid.WriteMethod(init, stuff(lcInit, at(hPostfixLine, lcInit), lcNewCode)
oGrid.columncount=0
So in design mode I'm using the regular baseclass columns, and in the end killing all the columns, and adding code to create them at runtime.