On a similar vain, I am working on a gridbuilder (prompted in part by your articels in foxtalk):
In the builder I have code in the afterrowcolevent like this
LPARAMETERS nColIndex
this.Parent.txt1.Value=this.Columns[nColIndex].header1.caption
this.Parent.txt.Value=this.Columns[nColIndex].header1.Alignment
this.Parent.txt3.Value=this.Columns[nColIndex].header1.Fontsize
this.Parent.txt4.Value=nColIndex
but nColIndex evaluates to .F.
what could bw wrong???
Peter
>>In a Grid object I can reference each columns by their idx number, what i was asking to myself is : how can I retrieve this number from a column ?
>>I found properties like columnorder but it could change.
>
>You can simply add that... in grid's .init,
>
>
for i=1 to this.columncount
> this.columns[i].addproperty("colindex",i)
>endfor
>
>Then for any column object you send as a parameter, this column object's index can be retrieved from its .colindex property. I've tried this and I'm seeing the proper values in the debugger.
Peter Cortiel