Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have some gridview rows that are Identical to the previous, how can I hide some of the rows, but leave one of them showing?

example:
ID, Number, Number
1, 2, 2
1, 2, 2
4, 6, 6
4, 6, 6
4, 6, 6

I would like to only show:
ID, Number, Number
1, 2, 2
4, 6, 6

is there a way to do this? and how?
Posted

1 solution

if you fetch data from database you can simply change the sql as below

SQL
select distinct ID, Number, Number from yourTable 

or
SQL
SELECT ID, Number, Number FROM yourTable  GROUP BY ID, Number, Number
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900