Posted 5 April 2020, 6:47 am EST
Hello,
I’m using the code below to filter two Grids based on one field selected from a Combobox, How do I modify it to work when selecting one or more fields from a C1MultiSelect control?
Dim str As New StringBuilder
str.Append(“”)
For i As Integer = 0 To C1Screen1.Splits(0).Rows.Count - 1
For j As Integer = i + 1 To C1Screen1.Splits(0).Rows.Count - 1
If C1Screen2(i, CBox1.Text) <> “” And C1Screen2(i, CBox1.Text) <> “N/A” Then
If C1Screen1(i, CBox1.Text) = C1Screen1(j, CBox1.Text) Then
If Not str.ToString.Contains(C1Screen1(i, CBox1.Text).ToString) Then
str.Append(C1Screen1(i, CBox1.Text) + “,”)
End If
Exit For
End If
End If
Next
Next
C1Screen1.Columns(“NSN”).FilterMultiSelect = True
C1Screen1.Columns(“NSN”).FilterSeparator = “,”
C1Screen1.Columns(“NSN”).FilterText = str.ToString().Remove(str.Length - 1, 1)
Thanks,
Victor