0

I have a table called Vendor that has two columns: VendorNum & VendorName.

Is there a way to create a list or a listbox or a listview that when a button is clicked, this vendor list will pop up. Then the selected popup list's row will pass the selected VendorNum into a textbox that's in the parent page..

I only know GridView has the select row option, but is it a proper way to put the gridview into a Listbox so the list can be scrolled up/down all within a fixed box?

user3486647
  • 191
  • 1
  • 4
  • 12

1 Answers1

0

You might want to take a look at the ListBox.SelectValue and/or ListBox.SelectedItem properties

  • k, but first how do you setup both columns within one ListBox? – user3486647 Oct 10 '14 at 18:08
  • @user3486647 There are several ways of populating a ListBox and the specific code will depend on your data format. Here is a basic example http://stackoverflow.com/questions/2675067/binding-listbox-to-listobject –  Oct 10 '14 at 18:15
  • i'm using webforms, not winform. Thanks, Saul, but the link still confuses me. – user3486647 Oct 10 '14 at 18:41
  • Sorry, I overlooked that. I have changed my answer to point at the webforms version of that control. Webforms was designed to be very similar to winforms, that link about populating a winforms listbox is still relevant for the webforms version –  Oct 10 '14 at 18:56