I have a dxgrid with columns, the first column containing a textblock with a context menu set. For handling the context menu button events, i need to access the data context of the row, and that's how i do it:
private void ContextMenuButton_Click(object sender, RoutedEventArgs e)
{
MenuItem menuItem = (MenuItem)e.Source;
ContextMenu menu = (ContextMenu)menuItem.Parent;
MyData ThisData = ((MyData)(((GridCellDataAlias)(((FrameworkElement)
(menu.PlacementTarget)).DataContext)).RowData.Row));
// Now I do what should with the data here
}
Now what I like to do is to have access to the other cell in the row (column #2), so i could refresh it visually. How can i access it? To refresh I'm going to try this code:
Action EmptyDelegate = delegate() { };
MyEntireRow.Dispatcher.Invoke(DispatcherPriority.Render, EmptyDelegate);
Thanks in advance.