private void MainForm_Load(object sender, EventArgs e) {
productVM = new ProductViewModel();
SetBindings();
setupDataGridView();
}
private void SetBindings() {
"Product.Quantity",
true,
DataSourceUpdateMode.OnValidation,
"0",
"#,##0;(#,##0);0"));
textBoxDescription.DataBindings.Add("Text", productVM, "Product.Description");
dataGridViewProducts.AutoGenerateColumns = false;
dataGridViewProducts.DataSource = productVM.Products;
}
在运行程序时,数据显示在DataGrid中,但没有显示在“数量和描述”文本框中。请帮助