Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 823
  • Last Modified:

DataGrid Iteration

I have a SmartDevice app with a datagrid.  I have set the datagrid's datasource to a dataset.  I want to know how to iterate through the data grid row by row but I can't find a "rowcount" property or anything else to do this. This seems like it should be pretty simple.......Any help would be appreciated

I am using VB.Net

i.e.

for 1=0 to 'rowcount'
'do something here
next


0
PSCTECH
Asked:
PSCTECH
  • 2
1 Solution
 
nonubikCommented:
You can use Items property to get a DataGridItemCollection class and the its Count property.

for 1=0 to Items.Count
0
 
PSCTECHAuthor Commented:
This doesn't work in CF. there is no item(s) property only item for the current item.  It may work in full blown vb but on a SmartDevice it doesn't seem to.
0
 
nonubikCommented:
Then take a look here: http://msdn.microsoft.com/smartclient/community/cffaq/cf10.aspx at the last question from 'DataGrid' paragraph.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now