简体   繁体   English

vb.net / DataGridView选择?

[英]vb.net / DataGridView selection?

On my DataGridView one of the columns is set to a ComboBox. 在我的DataGridView上,其中一列设置为ComboBox。 When I make a selection from this ComboBox the CellValue change Event is not triggered. 当我做这个组合框选择的CellValue变化事件不会被触发。 What event is triggered when I do the selection? 当我做选择什么事件被触发?

It's not as easy as you might wish but with the sample shown here on MSDN, it's not that hard. 这不是那么容易,因为你可能希望但显示的样本这里在MSDN上,这并不难。

What you need to do is use your DataGridView's EditingControlShowing event to create a SelectedIndexChanged event for the ComboBox in your DGV. 您需要做的是使用DataGridView的EditingControlShowing事件为DGV中的ComboBox创建SelectedIndexChanged事件。 Your ComboBox's SelectedIndexChanged event will be fired when your ComboBox's SelectedIndex value changes. 当ComboBox的SelectedIndex值更改时,将触发ComboBox的SelectedIndexChanged事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM