Results 1 to 3 of 3

Thread: Combo Problems

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Combo Problems

    The problem is very simple (In VB.6). When the user select and item y cboprovincia, i want to fill out other combo with the following select

    The problem is that when the user selected the item in the combo: Nothing happens.

    Any Help?

    Private Sub CboProvincia_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CboProvincia.SelectedIndexChanged

    Dim oDB As New Utilitarios
    Dim SqlString = "Select * From provincia where codigo_provincia= '" & CboProvincia.SelectedItem.ToString & "'" _
    & " and codigo_zona='000' and codigo_ciudad <> '000' " _
    & " order by codigo_provincia,codigo_ciudad "
    Me.cboCiudad.DataSource = oDB.GetDataTable(SqlString, CommandType.Text)

    Me.cboCiudad.DataTextField = "descripcion"
    Me.cboCiudad.DataValueField = "id"
    Me.cboCiudad.DataBind()
    Me.DataBind()
    End Sub

  2. #2
    Hyperactive Member fret's Avatar
    Join Date
    Sep 2004
    Posts
    472
    Did you bind the CboProvincia? not sure but try.
    CboProvincia.SelectedValue.ToString

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking SOLUTION

    The autopost back must be=true

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width