Hi Dragan,
Historically, building and maintaining grids has been cumbersome, so I've built a simple framework that makes grid building data driven... Two tables... gridheaderinfo (1 record, ie: record source, purpose of the grid, default sort, etc... griddetailinfo - many records, fields for captions, sort options, input formats, dynamic controls to be added, etc.)
Anyhow, it works great and does most of the work for you... then, if you need another column, or custom control, just put details in the grid detail table...
Its available in downloads at
http://pafox.org/pafoxwcapp/Downloads.foxIt's an accumulation of many techniques in grid building I've done in the past and works well -- consistently.
Don
>>
>>Sorry to replay a old thread, but I'm doing the same thing, and I'm getting the same error! ;-) I'm using VFP 9 SP1!
>>
>>Any news about it?
>
>Since I got some of these in regular use, I looked one up, and at runtime it does work like this:
>
>- grid.columncount=0
>- grid.recordsource="myalias"
>- in grid.init,
>
This.AddObject("colMe","gcol",{pass other parameters to gCol class})
>With This.colMe
> ** set some properties
>Endwith
>
>Still, in design mode, I had to get around this issue somehow, and the piece of code where I did that... well, couldn't find it :). I see that the tool I was building does create a grid with non-default column names, just couldn't find where I'm doing that. It's been months since I last touched that.
>
>Busy right now. Could you remind me of this issue in a couple of days?