SetDataTableSource(AnalyticalSupportData.Info supportData) { // set data source m_dataGrid.AutoGenerateColumns = false; m_dataGrid.DataSource = supportData.ElementInformation; // match column names with data source names m_colId.DataPropertyName = "Id"; m_colTypeName.DataPropertyName = "Element Type"; m_colSupportType.DataPropertyName = "Support Type"; m_colRemark.DataPropertyName = "Remark"; }
InfoForm(AnalyticalSupportData.Info supportData) { InitializeComponent(); SetDataTableSource(supportData); }