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

You are currently viewing the Pro VB.NET 2002/2003 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 March 18th, 2004, 10:26 AM
Registered User
 
Join Date: Nov 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to wolf27ea
Default Passing values to new row in a datagrid

Can someone tell me how to pass the value from a grid column in one row to the same column in a new row? I can get the value by using the following: gridType.Item(gridType.CurrentRowIndex, 0). This will return the value for column zero. Now when I go to input the new row, I need to fill that column so that the user doesn't miss type the information. It is a related table that is filling the datagrid. Any direction would be great. Thansk.

Thanks,

ernie
 
Old March 21st, 2004, 08:32 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You just need to access the other grid item and use the same syntax you have to access the same column. I'm not sure of the exact syntax to get at the new row, but it should look something like this:

grid.Items(grid.Items.Count-1)...

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old March 23rd, 2004, 09:58 AM
Registered User
 
Join Date: Nov 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to wolf27ea
Default

Thanks, Peter. I will try that. Appreciate the info.


Thanks,

ernie





Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbar in row of Datagrid Except Header Row Theone84 ASP.NET 2.0 Professional 0 August 11th, 2008 12:10 AM
compare values in one row to the next tholleran SQL Server 2000 7 March 22nd, 2007 04:45 PM
Passing values in DataGrid jezywrap ASP.NET 2.0 Professional 0 July 24th, 2006 10:20 AM
Manage data row by row in datagrid Dragonist Classic ASP Databases 5 July 29th, 2004 04:17 AM





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