gpt4 book ai didi

WPF DataGrid 绑定(bind)到 CurrentItem 或 SelectedItem?

转载 作者:行者123 更新时间:2023-12-04 18:05:11 30 4
gpt4 key购买 nike

如果我有 DataGrid在我的ViewProperty在我的ViewModel表示当前事件的 DataGridRow (例如,焦点项目或单击项目)我应该将我的属性绑定(bind)到 SelectedItemCurrentItem .假设我选择将其绑定(bind)到 SelectedItem , 那么 CurrentItem 是什么为了?我应该将另一个属性绑定(bind)到 CurrentItem ?

最佳答案

看看这个:DataGrid CurrentItem != SelectedItem after reentry with tab-button

First of all a row is selected by the user which makes the datagrid show that row in the selected way (SelectedItem and also CurrentItem contain the selected object). Then the focus is given to another control. In this status - the selection is still shown - SelectedItem is still there while CurrentItem is null!



好文章: http://docs.telerik.com/devtools/silverlight/controls/radgridview/selection/selecteditem-currentitem.html

关于WPF DataGrid 绑定(bind)到 CurrentItem 或 SelectedItem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30395794/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com