I'm using a DataGridTemplateColumn with Textbox and I'm trying to set the focus from the code, but i couldn't get it to focus. I'm putting this code in dg_SelectionChanged event.
I've tried many way including:
DataGridRow dgr = (DataGridRow)dg.ItemContainerGenerator.ContainerFromItem(dg.SelectedItem);
dg.CurrentCell = new DataGridCellInfo(dg.SelectedItem, dg.Columns);