You are right, I was wrong.
There is a technical reason this works the way it does. The grid maintains a volatile cache of recently used style object for optimization purposes. So, in this situation a new style object for this new value has been created and is in this volatile cache. So, when you use grid[row,col] to reference a style, the grid retrieves this cached value instead of accessing the GridData object to retrieved the stored value.
So, at this point, the new value appears to be stored in teh grid, but it really is only cached in teh volatile data store. The code below will retrieve the old value directly from the grid's GridData object as it is still there.
I suspect your code would work if you called gridControl1.ResetVolatileData so the cache values are flushed, an dthe grid has to go to its GridData object to retrieve the data. But I am not sure if there are any side effects of calling ResetVolatileData at this point. Getting the data directly from the GridData object may be safer.
private void gridControl1_CellsChanging(object sender, GridCellsChangingEventArgs e)
{
int row, col;
GridData data = this.gridControl1.Data;
bool b = e.Range.GetFirstCell(out row, out col);
while(b)
{
string oldValue = "";
if(data[row, col] != null)
{
GridStyleInfo style = new GridStyleInfo(data[row, col]);
oldValue = style.Text;
Console.WriteLine("({0},{1})=[{2}] ", row, col, oldValue);
}
b = e.Range.GetNextCell(ref row, ref col);
}
}