Click here to Skip to main content
15,847,077 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Suppose 1000 records have in datagridview.
I want to search a duplicate value in gridview.
how can i search that value in gridview without loop???

Please help me anybody...
Posted
Comments
Black_Rose 17-Apr-15 6:30am    
"how can i search that value in gridview without loop???"
and why u don't want to use loop..??
Peter Leow 17-Apr-15 6:35am    
Write the same line of statement 1000 times. Before reaching the end, you will fall in love with loop.
Thanks7872 17-Apr-15 6:39am    
Try it yourself and comeback when you face any problem doing the same. We help those who put some effort.

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!

But basically, there is no way of doing this that doesn't involve a loop of some form - it may be explicit, like for or foreach, or it could be "hidden" like a Linq query or SQL.

Me? I'd sort the records and look for duplicate values next to each other...using a loop.
 
Share this answer
 

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