Visual Basic.NET - Mostrar datos relacionados combo

 
Vista:

Mostrar datos relacionados combo

Publicado por Sherezade (7 intervenciones) el 24/05/2008 17:05:37
Buenas tardes!

Intento en un formulario que entre otras cosas me filtra por clientes que selecciono mediante un combo:

Me.cboCliente.DataSource = ds.Tables("Agencias")
Me.cboCliente.DisplayMember = "AGENCIA"
Me.cboCliente.ValueMember = "IDAGENCIA"
---------------------------------------------------
Dim dv As DataView = ds.Tables("Agencias").DefaultView
Dim filtro As Integer

dv.RowFilter = "AGENCIA ='" & Me.cboCliente.Text & "'" **********************ERROR
Me.txtIDCLIENTE.Text = dv.Item(0).Row("IDAGENCIA")
Me.txtCliente.Text = dv.Item(0).Row("AGENCIA")
If dv.Item(0).Row("DOMICILIO").ToString <> String.Empty Then
Me.txtDomicilio.Text = dv.Item(0).Row("DOMICILIO")
End If
If dv.Item(0).Row("CP").ToString <> String.Empty Or dv.Item(0).Row("POBLACION").ToString <> String.Empty Then
Me.txtCPPoblacion.Text = dv.Item(0).Row("CP") & " " & dv.Item(0).Row("POBLACION")
End If
If dv.Item(0).Row("CIF").ToString <> String.Empty Then
Me.txtCIF.Text = dv.Item(0).Row("CIF")
End If

De esta forma intento seleccionar un cliente, y que me muestre sus datos en varios textbox, pero tras darle un botón y que me muestre los datos, el combo no tiene más datos que el seleccionado.
¿Como podría recargar de nuevo el combo, o qué estoy haciendo mal?

Gracias por adelantado. Un cordial saludo,

Sherezade
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder