Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
'this first part gives me the correct page count w/o this pagecount = 0 Dim StrIC As String StrIC = "M-Test" Dim lngrow As Int32 ' was thinking of using this before but don't use it now. Dim lngX As Long If GridView1.PageCount = 0 Then For Each row As GridViewRow In GridView1.Rows() Next End If For lngX = 0 To GridView1.PageCount GridView1.PageIndex = lngX For Each row As GridViewRow In GridView1.Rows() lngrow = lngrow + 1 For Each cellResult As DataControlFieldCell In row.Cells Dim cellDCF As DataControlField = cellResult.ContainingField Dim cellID As String = cellDCF.HeaderText If cellID.ToString = "IC" Then Dim cellValue As String = CStr(cellResult.Text) If UCase(cellValue) = UCase(StrIC) Then cellResult.Visible = True cellResult.BackColor = Drawing.Color.Aqua Exit Sub Else cellResult.BackColor = Drawing.Color.Black End If End If Next Next Next
Join the community of 500,000 technology professionals and ask your questions.