Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 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 December 27th, 2007, 04:02 PM
Registered User
 
Join Date: Dec 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Programmatic manipulation of a datagridview

HI,
how can I move from one cell to another within a datagridview control, need to extract data but cant seem to move from one cell to the next to retreive its value

thanks

 
Old January 3rd, 2008, 11:14 AM
Registered User
 
Join Date: Jul 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This might help - not sure exactly what you are looking for:

Dim cellData as String

for i as short = 0 to DataGridView1.RowCount - 1
  for j as short = 0 to DataGridView1.ColumnCount
    cellData = DataGridView1.Rows(i).Cells(j).Value
  next j
next i



 
Old January 3rd, 2008, 09:16 PM
Registered User
 
Join Date: Dec 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks J0hnyager!:)
this will work great, the purpose is to extract a dataset from sql and transfer the data to variables so I can manipulate, the datagrid is an added step I guess but that way I can have a visual on what the code should be looking at.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatic Validation rit01 ASP.NET 2.0 Professional 3 May 11th, 2006 01:23 AM
Programmatic Rendering drhabi BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 27th, 2004 06:00 PM
Programmatic Rendering - Chapter 9 booksnore2 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 7th, 2004 07:36 PM





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