Posted 7 September 2019, 8:04 am EST
Hello,
I’m using the code below to identify all records in C1AOP5 with the same data in fields selected in C1Box1. How do you modify the code below to accomplish the same using ASP.NET MVC application?
If CBox1.SelectedItems.Count <> 0 Then
For Each ColName As [String] In CBox1.SelectedItems
Dim str As New StringBuilder
str.Append(“”)
For i As Integer = 0 To C1AOP5.Splits(0).Rows.Count - 1
For j As Integer = i + 1 To C1AOP5.Splits(0).Rows.Count - 1
If C1AOP5(i, ColName) = C1AOP5(j, ColName) Then If Not str.ToString.Contains(C1AOP5(i, ColName).ToString) Then str.Append(C1AOP5(i, ColName) + ",") End If Exit For End If Next Next C1AOP5.Columns(ColName).FilterMultiSelect = True C1AOP5.Columns(ColName).FilterSeparator = "," C1AOP5.Columns(ColName).FilterText = str.ToString().Remove(str.Length - 1, 1) TextBox11.Text = C1AOP5.RowCount If TextBox11.Text <> "" Then Panel1.Visible = True C1AOP5.Visible = True ' Label7.Visible = False End If Next For Each ColName As [String] In CBox1.SelectedItems C1AOP5.Splits(0).DisplayColumns(ColName).HeadingStyle.BackColor = Color.Blue C1AOP5.Splits(0).DisplayColumns(ColName).HeadingStyle.ForeColor = Color.White Next End If