更新时间:2023-02-20 15:47:48
这个链接可以帮到你
http://www.sommergyll.com/datagridview-usercontrols/datagridview-with-combobox.htm [ ^ ]
http://msdn.microsoft.com/en-us /library/system.windows.forms.datagridviewcomboboxcell.items.aspx [ ^ ]
-Ambi -
this link will help you
http://www.sommergyll.com/datagridview-usercontrols/datagridview-with-combobox.htm[^]
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcell.items.aspx[^]
-Ambi-
你好。我设法做了这样的事情。
首先我尝试使用CellBeginEdit和CellEndEdit,但没有出现ComboBox控件(只是它的可编辑框)。然后我使用了CellClick和CellValidating。它有效,但我必须解决可重入调用问题 - 最后我在网上找到解决方案。
我在这里解释:动态更改DataGridViewTextBoxCell到DataGridViewComboBoxCell
PS
如果您设法使用CellBeginEdit和CellEndEdit,请发布解决方案 - 我很好奇。
Hi. I managed to do something like this.
First I tried with CellBeginEdit and CellEndEdit but the ComboBox control didn't appear (just it's editable box). Then I used CellClick and CellValidating. It worked, but I had to solve the "reentrant call" problem - finally I find the solution on the net.
I explained it here: Dynamically change DataGridViewTextBoxCell to DataGridViewComboBoxCell
P.S.
If you manage to use CellBeginEdit and CellEndEdit, please post the solution here - I'm very curious about it.