WPF DataGrid - How to move keyboard focus to newly added row after tab press

为君一笑 提交于 2019-12-04 05:33:27

You could try something like

this.SelectRowCell(this.Items.Count - 1, 0);

But I'm not sure if that will set the focus too. If not then try the following:

DataGridCell cell = this.GetCell(this.Items.Count - 1, 0);

if (cell != null)
{
    cell.Focus();
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!