Please try if this works for you:
private void dataGrid1_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
var re = e.OriginalSource as TextBlock;
var text= re.Text;
foreach (DataRowView item in dataGrid2.ItemsSource)
{
var cellValue1 = item.Row.ItemArray[1].ToString();
if (cellValue1 == text)
dataGrid2.SelectedItem = item;
}
}
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.