Home Forums WinForms controls Other WinForms controls WinComboBox Reply To: WinComboBox

Odi [Xceed]
Post count: 426

English “babel fish” translation:

Good day Friends,

I need help with the WinComboBox on a form, loading data from a database, but I want it to be the same control for all my forms and not have to create separate code for it on each form.

I use one project for all the controls and within that project I use for all of them: To add classes of components and within them utlizo the following instructions:

Imports Xceed.Editors
Imports Xceed.UI
Public Class comboxceel
Inherits Xceed.Editors.WinComboBox
Public Sub llenar_combo()
Dim Stri_Comand_SQL As String
Dim oCnx As New conexion
Dim oCmd As New SqlClient.SqlCommand(Stri_Comand_SQL, oCnx.obtenerConexion)
Dim oAdp As New SqlClient.SqlDataAdapter(oCmd)
Dim oDtt As New DataTable
Me.DisplayMember = “SISM05NOMPRO”
Me.ValueMember = “SISM05CODPRO”
Me.DataSource = oDtt
End Sub
End Class

Previous instructions if it works changing to me:

Inherits Xceed.Editors.WinComboBox


Inherits ComboBox

…and if it works to me correctly….

Imported from legacy forums. Posted by Odi [Xceed] (had 2884 views)