开发者

Event of DataGridViewComboBoxCell

开发者 https://www.devze.com 2023-03-28 13:41 出处:网络
I am using the following code for binding a combo box column in a grid view in my winform Data开发者_C百科GridViewComboBoxCell dgBatch = (DataGridViewComboBoxCell)grvProduct.Rows[pRowIndex].Cells[pCo

I am using the following code for binding a combo box column in a grid view in my winform

Data开发者_C百科GridViewComboBoxCell 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";

How can i get the selectedindexchange event of this combo box column?


You could try using the DataGridView.EditingControlShowing event and casting the EventArgs to a ComboBox control and then you can use the SelectesIndexChanged event.

0

精彩评论

暂无评论...
验证码 换一张
取 消