User-1665848652 posted
Sub RemoveDuplicates()
Dim counter AS Integer
Dim rows AS GridviewRowCollection = myGridview_Users_ExtensionLists.Rows
Dim curValue AS String = rows(0).Cells(0).Text
FOR counter = 1 TO (myGridview_Users_ExtensionLists.Rows.Count - 1)
IF curValue <> rows(counter).Cells(0).Text THEN
curValue = rows(counter).Cells(0).Text
Response.Write(rows(counter).Cells(0).Text & " " & counter & "<br />")
ELSE
rows(counter).Cells(0).Text = ""
Response.Write(rows(counter).Cells(0).Text & "<br />")
END IF
NEXT
END Sub
This code correctly appends the row number and shows a list at the top of the page, but it does not show any of the data in the cells before the appended numbers. It allows me use .Text to replace the data with empty strings, but since it sees all of the
.Text's as empty I am unable to do a check to see which ones I want to change. Any Ideas? I am calling this Sub in the body of my page just before the Gridview control is located.