GridViewComboBoxColumn的属性SelectedValueMemberPath用于什么?

时间:2015-08-13 14:43:14

标签: wpf xaml telerik

&lt; p&gt;我无法找到除此链接之外的任何文档,这些文档根本没有用...&lt; a href =&#34; http://docs.telerik.com/devtools/wpf/api /html/P_Telerik_Windows_Controls_GridViewComboBoxColumn_SelectedValueMemberPath.htm"的rel =&#34; nofollow的&#34;&GT; HTTP://docs.telerik.com/devtools/wpf/api/html/P_Telerik_Windows_Controls_GridViewComboBoxColumn_SelectedValueMemberPath.htm< / A&GT;&LT; / p为H.

2 个答案:

答案 0 :(得分:1)

SelectedValueMemberPath是要用作组合框所选值的属性的路径。

假设您有一组绑定到GridViewComboBoxColumn的Person对象。

public class Person
{
    public string Id {get; set;}
    public string Name {get; set; }
}

当用户从组合框中选择Person时,您希望所选值为Id。

在这种情况下,您可以设置:

SelectedValueMemberPath="Id"

GridViewComboBoxColumn将在当前所选Person的绑定中查找上面的路径。

我希望这有帮助!

答案 1 :(得分:0)

相关问题