datagrid sorting

Mar 27, 2010 at 8:35 AM

Hello
I change my cell's forgrownd when I add a row or change  a cell
But when I click on header to sort the column the forgrownd change to the basic color 
what should I do?
note: I use toolkit datagrid

mycode:
void BaseGrid_InitializingNewItem(.....)
{
        this.loadingRow+=new EventHandler<DataGridRowEventArg>(BaseGrid_LoadinRow);
}

void BaseGrid_LoadingRow(....)
{
        e.Row.forgrownd=Brushes.Green;
}

 private void datagrid_CellEditEnding(....)
 {
        DataGridCell cell = DataGridHelper.GetCell(e.Row, e.Column.DisplayIndex);
        cell.Background = Brushes.Red;
       this.loadingRow-=new EventHandler<DataGridRowEventArg>(BaseGrid_LoadinRow);

}

Mar 28, 2010 at 9:23 AM

I am waiting...