79412655

Date: 2025-02-04 18:19:29
Score: 1.5
Natty:
Report link

I managed to fix it by adding a line of code. I think I'm very dumb.

var cell = cellContent.Parent as DataGridCell;
if (cell != null)
{
 cell.Focus();
 var textBox = cellContent as TextBox;
 if (textBox != null)
 {
  textBox.SelectAll();
  textBox.Focus(); // this line
 }
}

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: shiblabi