日期:2014-05-17 浏览次数:20737 次
public class Person { public string Name { get; set; } public Country Country { get; set; } } public class Country { public string CountryName { get; set; } public Image NationalFlag { get; set; } }
dataGridView1.Columns.Add(new DataGridViewTextBoxColumn() { HeaderText = "Name", DataPropertyName = "Name" }); dataGridView1.Columns.Add(new DataGridViewTextBoxColumn() { HeaderText = "CountryName", DataPropertyName = "CountryName.Name" });