title: Datagrid cell tooltip and foreground setting in CellEditEnding - it's moving, why?
body: <p>I'm using the <strong>CellEditEnding</strong> event for setting new <strong>foreground color</strong> and <strong>tooltip</strong> for editted cells. It works quite ok, except why I scroll down in the datagrid the foreground colour and tooltip moves in the column and that makes it quite useless.</p>
  <p>I think it must be something with the <strong>FrameWork element</strong> but I'm quite not sure how to solve this problem.</p>
  <h2>My code:</h2>
  <pre><code>private void myDataGrid_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
    {
    
      System.Windows.Controls.ToolTip tt = new System.Windows.Controls.ToolTip();
      tt.Content = &quot;My tooltip text&quot;;
      FrameworkElement element = (e.Column.GetCellContent(e.Row));
      System.Windows.Controls.DataGridCell chosen = (element.Parent as System.Windows.Controls.DataGridCell);
      chosen.ToolTip = tt;
      chosen.Foreground = new SolidColorBrush(Colors.Red);
    }
  </code></pre>
  <p>Can anyone tell me why it's moving(the tooltip and color) to other cells when scrolling in the datagrid? And how shoud I solve it?</p>
  <p>Or if you have better idea on how to set the tooltip and foreground color for editted cells in datagrid, please tell me.</p>
  <p>Thanks for any help in advance ;)</p>