【发布时间】:2013-12-07 04:28:15
【问题描述】:
我有两个班级:
public partial class EMPLOYER
{
public int id { get; set; }
public string name { get; set; }
public string surname { get; set; }
public int employer_func_id { get; set; }
public virtual EMPLOYER_FUNC EMPLOYER_FUNC { get; set; }
}
和
public partial class EMPLOYER_FUNC
{
public EMPLOYER_FUNC()
{
this.EMPLOYER = new HashSet<EMPLOYER>();
}
public int id { get; set; }
public string func_name { get; set; }
public virtual ICollection<EMPLOYER> EMPLOYER { get; set; }
}
例如,这是我的模型。现在我写sql查询。此查询返回 EMPLOYER 对象的列表。在视图中,我有 gridcontrol,其中有列名、姓氏和 func_name。显示姓名和姓氏很简单,没有问题,但我无法显示func_name。我尝试在网格控件中将 EMPLOYER_FUNC.func_name 输入到字段名称列但不起作用..你知道我该怎么做吗?非常感谢
【问题讨论】:
标签: c# sql devexpress gridcontrol