Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 31st, 2007, 10:51 AM
Authorized User
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGridView Loop


I have a DataGridView and I want to display all testID's on one row that have the same securityID.

In the database the data is...
testID securityID
id1 56666
id2 56666
id3 56666
id4 56788

So want the output to be...


Do I do this using a Loop? How do I go about it?

Old November 1st, 2007, 12:07 PM
samjudson's Avatar
Friend of Wrox
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts

Basically I think you'll have to write some SQL that returns what you want, or alternatively create dictionary manually from the SQL yourself. I don't believe there is anything in the DataGridView which is going to allow you to do this easily.

/- Sam Judson : Wrox Technical Editor -/

Similar Threads
Thread Thread Starter Forum Replies Last Post
datagridview help manius VB Databases Basics 1 January 27th, 2008 02:44 AM
DataGridView Loop + Compare obrienkev C# 2005 1 December 30th, 2007 07:53 PM
DataGridView Use BrianWren Visual Basic 2005 Basics 1 March 5th, 2007 04:34 PM
DataGridView Sakkaw C# 2005 1 January 9th, 2007 12:06 PM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.