Help with partial string search
Posted on 2013-01-08
I am using the code below to select rows in a Grid where values of SDeactivation is found agains SDéactivation_ID which is in Coumn(2). SDeactivation_ID contains single values.
When SDeactivation is a single value all is working of but when SDeactivation includes multiple values (i.e. 1,2,3) it does not work. How do i modify the code to select rows when using multiple values for SDeactivation?
MsgBox("keySDeactivation)" & keySDeactivation)
' keySDeactivation = "1,2" does not works
' keySDeactivation = "1" works
If keySDeactivation <> "" Then
Dim _tableA As DataView = dtMasterA.DefaultView
C1SDeactivation.DataSource = _tableA
For i As Integer = 0 To C1SDeactivation.RowCount - 1
If C1SDeactivation.Columns(2).CellValue(i).ToString().Contains(keySDeactivation) = True Then