Set the SelectedItem to value of existing record

  • Thread starter Johan Van Dyk via .NET 247
  • Start date
J

Johan Van Dyk via .NET 247

Hi All

I have a form where the user can insert a record to the SQl database. In this form there are several Dropdown's. This I've got working.

I now want to use a copy of this form to UPDATE the existing records. Ther are several dataset's to populate the various dropdowns and then one dataset which contains the values of the record being edited.

How can I set the SelectedItem/SelectedIndex of the dropdown's to the existing record?
A sample piece of code would be highly appreacited.
PS: using C#
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top