Manually add archived rows to dropdown if needed for selection

I have 2 subs. The first one populates the dropdown list. The second selects a value in the list.

Rows for the dropdown have been archived and don't get populated in the list. But if they are in the second sub to be selected, I need to be able to add that value back into the list for selection
Sub : 1 

        Dim sExternal As String = "SELECT * FROM tBOSTypes WHERE sCategory = @sCategory AND Archive = @Archive Order By sItem"
        Dim daExternal As New SqlClient.SqlDataAdapter(sExternal, myUtility.sqlConn)
        daExternal.SelectCommand.Parameters.AddWithValue("@sCategory", "External Wall Material")
        daExternal.SelectCommand.Parameters.AddWithValue("@Archive", False)
        Dim dtExternal As New DataTable
        Dim newCustomersRow As DataRow = dtExternal.NewRow()
        newCustomersRow("ID") = "0"
        newCustomersRow("sItem") = "Select Wall Type..."
        dtExternal.Rows.InsertAt(newCustomersRow, 0)
        cboExternal.DataSource = dtExternal
        cboExternal.DisplayMember = "sItem"
        cboExternal.ValueMember = "ID"

Sub : 2

        Dim sWall As String = "SELECT     tBOSItems.BOSTypeID, tBOSTypes.sCategory, tBOSTypes.sItem, tBOSItems.ProjectID, tBOSTypes.ID " & _
                           "FROM         tBOSTypes INNER JOIN " & _
                                       "tBOSItems ON tBOSTypes.ID = tBOSItems.BOSTypeID " & _
                           "WHERE     (tBOSItems.ProjectID = @ProjectID) AND sCategory = @Type"
        Dim daWall As New SqlClient.SqlCommand(sWall, myUtility.sqlConn)
        Dim dtWall As New DataTable
        daWall.Parameters.AddWithValue("@ProjectID", ContainerForm.ProjectID)
        daWall.Parameters.AddWithValue("@Type", "External Wall Material")
        WallID = daWall.ExecuteScalar
        cboExternal.SelectedValue = WallID

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can retrieve both the value and text and then use FindString/FindStringExact method to see if it exists in the list and add if not.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.