>I read this example wher i can get the controlsource name of my column:
>
>with sbo.pageframe1.page1.cont1.grid1
> local nColumnIndex
> for m.nColumnIndex = 1 to .ColumnCount
> .Columns(m.nColumnIndex).Comment = .Columns(m.nColumnIndex).ControlSource
> msg(.Columns(m.nColumnIndex).ControlSource) && display BI.Article
> endfor
>endwith
>
>Is it possible to dysplay also the value for my textbox grid where the controlsource is " Bi.ARTICLE" , because i know the controlsource.
>
>for example my form have a grid with 2 columns
>
>article and description
>
>Article controlsource is BI.ARTICLE
>description controlsource is BI.DESCRIPTION
You can add a property to each column, something like this:
for i=1 to .columncount
loCol=.columns[i]
loCol.addProperty("oldValue", eval(loCol.controlsource))
endfor
Do this at the end of grid.init(). Then, in ARCC(), in your loop, you simply compare current value, i.e. eval(.Columns(m.nColumnIndex).ControlSource) with .Columns(m.nColumnIndex).oldValue and do whatever you want with them.
Note that you must do eval() to get the actual value. The .controlSource is the qualified name of the field, i.e. "Bi.Article", not the actual text inside the field.
Also, that loop which fills the .oldValue property for each column, should be run when you want the old value saved into a property. Now, this being a grid, it may be the best to call this code from .BRCC(), because grid has only one row (the other rows are only displays, the current row is the only one which has controls).