#region 当前选定行的TextBox获得焦点 /// <summary> /// 当前选定行的TextBox获得焦点 /// </summary> public void SelectedRowTBFocus() { if (SelectIndex != -1) { FrameworkElement item = grid.Columns[6].GetCellContent(grid.Items[SelectIndex]); DataGridTemplateColumn temp = (grid.Columns[6] as DataGridTemplateColumn); SelectTB = temp.CellTemplate.FindName("FinCode", item) as TextBox; SelectTB.Focus(); } } #endregion
获取当前选定行的TextBox对象
时间: 2024-10-10 12:58:49