Completed
Last Updated: 10 Sep 2015 11:03 by ADMIN
ADMIN
Dimitar
Created on: 30 Apr 2014 13:00
Category: GridView
Type: Bug Report
1
FIX. RadGridView - when row value is changed the old value is not available neither in RowsChanging nor in RowsChanged events.
To reproduce:
- Subscribe to the following RowsChanged event handler:

void radGridView1_RowsChanged(object sender, GridViewCollectionChangedEventArgs e)
{
    if (e.Action == NotifyCollectionChangedAction.ItemChanged)
    {
        GridViewDataRowInfo updrow = (GridViewDataRowInfo)e.NewItems[0];
        GridViewDataRowInfo oldrow = (GridViewDataRowInfo)e.OldItems[0];

        if (updrow.Cells[2].Value != oldrow.Cells[2].Value)
        {
            Console.WriteLine(updrow.Cells[2].Value);
            Console.WriteLine(oldrow.Cells[2].Value);
        }
    }
}

- You will notice that both values are always equal.

Workaround:
The CellValidating event can be used instead.
 
0 comments