使用VB.Net,我有一個DataGridView與組合框列。用戶在ComboBox中更改選區時甚至可以使用該選項?然後進行測試 -DataGridView&ComboBox事件?
1
A
回答
1
在Grid.Item.FormatedValue,而不是價值
0
.FormatedValue爲當前單元格在您關注的列中。
+0
這是一條評論或答案?如果只是評論,請考慮編輯您的答案。 – 2011-06-26 18:59:37
2
您可以在此事件,當組合框的值已被選定...
Private Sub dataGridView_EditingControlShowing(ByVal sender As Object, ByVal e As DataGridViewEditingControlShowingEventArgs)
Try
If (Me.dataGridView.CurrentCell.ColumnIndex = CType(Column.Col,Integer)) Then
Dim comboBox As ComboBox = CType(e.Control,ComboBox)
If (Not (comboBox) Is Nothing) Then
AddHandler comboBox.SelectedIndexChanged, AddressOf Me.ComboBoxIndexChanged
End If
End If
Return
Catch Ex As Exception
Utils.ErrMsg(Ex.Message)
Return
End Try
End Sub
0
CurrentCellDirtyStateChanged SelectedValueChanged
相關問題
- 1. C#/ Winforms,DataGridView/Combobox
- 2. vb.net/DataGridView/ComboBox列?
- 3. Vb.net/DataGridView/ComboBox列
- 4. DataGridView - ComboBox @ runtime
- 5. DataGridView和Combobox列?
- 6. ComboBox onChange事件
- 7. DataGridView和ComboBox問題
- 8. Datagridview combobox列的值
- 9. datagridview中的combobox列
- 10. Datagridview Cellclick事件
- 11. DataGridView事件
- 12. DataGridView中的外鍵Combobox
- 13. DataGridView ComboBox列動態項目
- 14. C#DataGridView combobox add data programaticaly
- 15. DataGridView和CellEndEdit事件
- 16. DataGridView的CellClick事件
- 17. Excel ActiveX ComboBox onClick事件
- 18. php&js combobox觸發事件
- 19. 未提高Combobox INotifyPropertyChanged事件!
- 20. ComboBox SelectionChanged事件火災晚
- 21. DataGridView複選框事件
- 22. DataGridView不通過事件
- 23. datagridview取消選擇事件
- 24. 的DataGridView行更新事件
- 25. CellValueChanged與CellValidating DataGridView的事件
- 26. DataGridView滾動事件(和ScrollEventType.EndScroll)
- 27. BeginPrint事件和dataGridView問題
- 28. 尋找事件的DataGridView
- 29. C#的DataGridView - 從CellEndEdit事件
- 30. DataGridView ComboBox在焦點時不保存
另請考慮填寫您的個人資料,以便我們可以給您打電話給除「未知」以外的內容。您的個人資料在這裏:http://stackoverflow.com/users/198155/unknown-google – 2009-11-16 05:29:48