情景:
Parent/Child,child对象中包含一个Parent的属性,如下
public class Parent
{
Name,
ID,
...
}
public class Child
{
Name,
ID,
...
private Parent myParent
public Parent MyParent
{
get{return myParent;}
set{myParent = value;}
}
...
}
把某一个Child列表绑定到GridView或是其他数据控件上,希望在空间上看到Parent的Name,如何绑定。
Parent/Child,child对象中包含一个Parent的属性,如下
public class Parent
{
Name,
ID,
...
}
public class Child
{
Name,
ID,
...
private Parent myParent
public Parent MyParent
{
get{return myParent;}
set{myParent = value;}
}
...
}
把某一个Child列表绑定到GridView或是其他数据控件上,希望在空间上看到Parent的Name,如何绑定。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货