how to set focus to particular cell of WPF toolkit datagrid

后端 未结 5 1354
再見小時候
再見小時候 2020-12-29 08:58

I am using WPF toolkit provided DataGrid control to display product list along with its OpenStock, Description etc. In this DataGrid i have set OpenStock column to editable

5条回答
  •  醉话见心
    2020-12-29 09:21

    You need to set the current cell to the one you want edited and then call BeginEdit in your Loaded handler:

    dataGrid1.CurrentCell = new DataGridCellInfo(
        dataGrid1.Items[0], dataGrid1.Columns[3]);
    dataGrid1.BeginEdit();
    

    If you give your DataGridTextColumn a name in XAML you can use that name rather than Columns[3].

提交回复
热议问题