2011-08-16 88 views
0

的我使用我的winform在網格視圖綁定組合框列事件的DataGridViewComboBoxCell

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事件該組合框列下面的代碼?

回答

0

您可以嘗試使用DataGridView.EditingControlShowing事件並將EventArgs投射到ComboBox控件,然後您可以使用SelectesIndexChanged事件。

相關問題