Drop Down List - SelectItem

Results 1 to 2 of 2

Thread: Drop Down List - SelectItem

  1. #1
    Join Date
    Dec 1969

    Default Drop Down List - SelectItem

    I have a drop down list - it contains a list of all or our vendors. <BR>When I need to display our customer records on a form so that they might be editted if needed, how do I get this drop down list to show which vendor is associated with a specific customer list, but allow the user to edit the vendor (change to a different vendor) on the customer record if needed.<BR><BR>So basically - I have a drop down list that has 5 records in it Vendor123, Vendor333, Vendorabc, Vendorxyz, Vendor1a2a <BR><BR>my customer record is associated with the 3rd vendor(Vendorabc) in the vendor list - I want Vendorabc to show - but all the other vendors are still in the list, in case a different Vendor needs to be selected.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Drop Down List - SelectItem

    You need to select the index of the vendor associated with the current customer:<BR><BR>// Assume a DropDownList named "myDropDown"<BR><BR>ListItem li = myDropDown.Items.FindByText("Vendorabc");<BR>myDro pDown.SelectedIndex = myDropDown.Items.IndexOf(li);

Posting Permissions

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