Private Sub CBCWSelectedItems_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CBCWSelectedItems.SelectedIndexChanged
Dim selectedIndex As Integer
selectedIndex = CBCWSelectedItems.SelectedIndex
Dim selectedItem As Object
selectedItem = CBCWSelectedItems.SelectedItem
MessageBox.Show("Selected Item Text: " & selectedItem.ToString() & Microsoft.VisualBasic.Constants.vbCrLf &
"Index: " & selectedIndex.ToString())
ListMatrix.DataSource = GetMatrixData(selectedItem.ToString()).AsEnumerable().Select(Function(r) r.Field(Of String)("Word")).ToList()
ListMatrix.Refresh()
End Sub
Public Function GetMatrixData(ByVal StrWordIn As String) As DataTable
Dim StrProcName As String
Dim StrWord As String
StrWord = StrWordIn
dtMatrix = New DataTable
Dim connectionString As String = ConfigurationManager.ConnectionStrings("Dictionary").ConnectionString
If OpTag.Checked = True Then
StrProcName = "usp_GetMatrix"
Using connMatrix As New SqlConnection(connectionString)
Using cmdMatrix As New SqlCommand(StrProcName, connMatrix)
cmdMatrix.CommandType = CommandType.StoredProcedure
connMatrix.Open()
cmdMatrix.Parameters.AddWithValue("@WordVar", StrWord)
Dim readerMatrix As SqlDataReader = cmdMatrix.ExecuteReader()
dtMatrix.Load(readerMatrix)
End Using
End Using
Return dtMatrix
Else
End If
End Function
ee3.JPG
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.