WPF DataGrid:编辑所有单元格,新行位置,单击一次即可编辑

发布于 2024-08-13 05:50:37 字数 126 浏览 1 评论 0原文

我想知道是否有人可以指出我使用 DataGrids 的正确方向。

  1. 我试图将新行放置在网格顶部
  2. 当用户单击一个单元格时,该行中的所有单元格都会进入可编辑状态。

干杯

I was wondering if anyone could point me into the right direction with DataGrids.

  1. I'm trying to position the new row at the top of the grid
  2. When the user clicks a cell all cells in the row move into an editable state.

Cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

此刻的回忆 2024-08-20 05:50:37

检查一下单击编辑:
http://wpf.codeplex.com/wikipage?title=Single-Click%20Editing

这用于新行格式:
http:// /blogs.msdn.com/b/vinsibal/archive/2008/11/05/wpf-datagrid-new-item-template-sample.aspx

我认为在顶部放置新行可能是不可能的,因为新项目行不是 DataGrid 控件模板的一部分。不过还没有尝试过。

Check this out for single click editing:
http://wpf.codeplex.com/wikipage?title=Single-Click%20Editing

And this for New row formatting:
http://blogs.msdn.com/b/vinsibal/archive/2008/11/05/wpf-datagrid-new-item-template-sample.aspx

I think positioning a new row on top might not be possible as the new item row is not part of the DataGrid's control template. Haven't given it a try though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文