Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics 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 29th, 2004, 08:51 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dataviews

I am unfamiliar with dataviews, I have setup a dataview of a dataset and can find its record count, but now I want to be able to use the items within it for example using a dataset.

dataset1.table(0).rows(0).item("Number")

Can you do the same using a dataview? What I need it for is to add up all the figures in a certain column of the dataview.

Thanks

Louisa

 
Old October 29th, 2004, 02:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

objView.Item(0) returns a DataRowView object. I usually do something like this when I need to iterate through:

for intI As Integer = 0 to objView.Count
  Dim objRow As DataRow = objView.Item(intI).Row

  'Do what you need with the row
next

Brian
 
Old November 4th, 2004, 09:20 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perfect

Thank you
Louisa






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataviews Louisa VB.NET 2002/2003 Basics 1 October 15th, 2004 11:09 AM
Complex Dataviews Alaric ADO.NET 0 October 16th, 2003 07:56 AM





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