我使用以下代码在winform的网格视图中绑定组合框列。
DataGridViewComboBoxCell dgBatch = (DataGridViewComboBoxCell)grvProduct.Rows[pRowIndex].Cells[pComboColName];
DataTable dtBatch = new DataTable();
dtBatch = iExportSalesOrder.SelectProductDetails(pack_detl_ID);
dgBatch.DataSource = dtBatch;
dgBatch.ValueMember = "qty";
dgBatch.DisplayMember = "sBatch_No";如何获取此组合框列的selectedindexchange事件?
发布于 2011-08-16 14:23:48
您可以尝试使用DataGridView.EditingControlShowing事件并将EventArgs强制转换为ComboBox控件,然后即可使用SelectesIndexChanged事件。
https://stackoverflow.com/questions/7074149
复制相似问题