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 May 24th, 2004, 10:18 PM
Authorized User
 
Join Date: Jul 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Default Looking for Datagrid Cols&Columns


how do i get the datagrid1.cols() and datagrid1.columns()and and loop to rows thru VBNet? it was such an easy thing in VB6



__________________
Proud To Be Pinoy
 
Old May 25th, 2004, 08:12 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Why do you want to do this? .Net provides with great additional capabilities so we don't have to spend so much time writing these loops over and over. The DataGrid utilizes databinding for these kinds of operations.

However, if you want to access the DataGrid items, use the DataGrid.Items collection to access the "rows" of the datagrid. Keep in mind that this collection contains ALL the items of the datagrid. These include the header, footer, pager, item, alternate item, edit item, etc. If you want to loop thru the Items, you'll need to test each DataGridItem for its ItemType: any DataGridItem that is an "Item" or "AlternateItem" is a data row.

Peter
-------------------------
Work smarter, not harder





Similar Threads
Thread Thread Starter Forum Replies Last Post
Columns in Datagrid monika.vasvani ASP.NET 1.0 and 1.1 Professional 2 December 3rd, 2006 11:26 AM
new table cols per record, paging, & select scottiegirl PHP Databases 5 June 21st, 2006 12:29 PM
Sorting of columns in Datagrid lily611 General .NET 2 July 21st, 2005 07:50 AM
Calc TEXTAREA ROWS & COLS based on Font Ron Howerton Classic ASP Basics 0 March 21st, 2005 11:17 AM
sub columns in a datagrid pankaj_daga ASP.NET 1.0 and 1.1 Basics 1 October 22nd, 2003 09:20 AM





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