Results 1 to 4 of 4

Thread: ComboBox click to refresh another ComboBox

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    3

    Question ComboBox click to refresh another ComboBox

    Hello
    This has been driving me crazy for awhile now, how do you refresh a combo box from clicking on something from another Combobox (using Visual Basic).

    i dont want to use a button for this as i know it works that way by using .Databind() on the other combobox.

    In access it is so easy by using the click event on a combo box but visual studio does not seem to use it.

    Name:  ComboBox Refresh.jpg
Views: 318
Size:  17.8 KB

    Help please!

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    3

    Re: ComboBox click to refresh another ComboBox

    Any ideas?

  3. #3
    Hyperactive Member Rocketdawg's Avatar
    Join Date
    Feb 2003
    Location
    Back in the doghouse
    Posts
    294

    Re: ComboBox click to refresh another ComboBox

    Hi, you'll want to use the OnSelectedIndexChanged event on the first dropdownlist to data bind the second.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2016
    Posts
    3

    Re: ComboBox click to refresh another ComboBox

    Thanks but i tried that but it didnt work.

    But i finally solved it!

    Adding AutoPostBack="True" to the asp code!

    <aspropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="SlotDateCombo" DataValueField="SlotDateCombo">
    </aspropDownList>

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