1
我需要在表中顯示子實體。winform datagridviewtextboxcolumn datapropertyname child
// Entitys
public class Sp
{
public int Id { get; set; }
public int IdDict { get; set; }
public Dict Dict { get; set; }
}
public class Dict
{
public int Id { get; set; }
public string Caption { get; set; }
}
如何綁定?
var c = new DataGridViewTextBoxColumn
{
// How can I do?
DataPropertyName = "Dict.Caption"
}
該應用程序是顯示一個空單元格
的可能的複製[DataGridViewColumn.DataPropertyName性](https://stackoverflow.com/questions/2221207/datagridviewcolumn-datapropertyname-property) – 2017-08-23 06:05:42