WPF DataGridTemplateColumn. Am I missing something?

前端 未结 4 411
死守一世寂寞
死守一世寂寞 2021-01-12 20:19
     
        
            
                &l         


        
4条回答
  •  不思量自难忘°
    2021-01-12 20:33

    The issue that you faced is that the control (e.g. TextBox) within the DataGridTemplateColumn is contained within a DataGridCell. By default the DataGridCell has tab-stop functionality. Thus the reason for having to hit TAB twice to get focus to your TextBox control. The solution is to disable the tab-stop functionality for the DataGridCell. This can be done via a style for the DataGridCell.

    Here's the solution:

    
    

提交回复
热议问题