WPF DataGrid - 将单元格编程为编辑模式 [英] WPF DataGrid - Set a cell into edit mode programatically

查看:150
本文介绍了WPF DataGrid - 将单元格编程为编辑模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 我有一个WPF DataGrid,显示一些数据记录(限于ObservableCollection)。

  • I have a WPF DataGrid that shows some data records (bounded to an ObservableCollection).

用户点击编辑按钮,所选择的趋势线应移动到编辑模式(如同用户双击此行一样)。

When the user clicks "Edit" button, the currend selected row should move into edit-mode (As if the user double-clicked this row).

知道如何做的人?

推荐答案

以下是MSDN上WPF DataGrid的文档 BeginEdit 方法似乎是您正在寻找的对于。

Here is the documentation of the WPF DataGrid on MSDN. The BeginEdit method seems to be what you are looking for.

PS:我不知道这是否适合您的应用程序,但是很多DataGrid用户发现单击编辑有用。

PS: I don't know if this is suitable for your application, but many DataGrid users find Single-Click Editing useful.

这篇关于WPF DataGrid - 将单元格编程为编辑模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆