我想显示来自 List 的 datagridview 数据,但显示来自字典(或列表)的所有数据。我有两个像下面这样的课程。现在我想在 DataGridView 中列出字典中的所有 MeasureSteps,一对一,以及 Board 类的乘法信息。
什么控制帮助我?或者,如果我可以用 datagridview 做到这一点,那该怎么做?
class Board
{
public string Station { get; set; }
public DateTime TestDate { get; set; }
public string TestProgram { get; set; }
public string TestRevision { get; set; }
public string ArticleNumber { get; set; }
public bool Result { get; set; }
public string SerialNumber { get; set; }
public string Operator { get; set; }
public string BatchNumber { get; set; }
public string TestTime { get; set; }
public string TestObjectRevision { get; set; }
public string TestObjectDescription { get; set; }
public string TestObjectName { get; set; }
public string InstrumentInventoryNumber { get; set; }
public string InstrumentArticleNumber { get; set; }
public string InstrumentName { get; set; }
public Dictionary<string,MeasureStep> Measurements { get; set; }
}
class MeasureStep
{
public string TestFunction { get; set; }
public string Descripton { get; set; }
public double LowerLimit { get; set; }
public double UpperLimit { get; set; }
public double MeasuredValue { get; set; }
public string Unit { get; set; }
public bool Result { get; set; }
}