Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Jun 29

Written by: Steve Gray
6/29/2009 11:36 AM  RssIcon

This code sample will demonstrate how to iterate through a Janus grid in VB.NET

Dim row As Janus.Windows.GridEX.GridEXRow
Dim bSelected As Boolean
 
'loop through the grid and make sure that there are no errors
For i = 0 To Me.grdBidders.RowCount - 1
    Me.grdBidders.Row = i
    row = Me.grdBidders.GetRow()
    bSelected = row.Cells("selected").Value
 
    If bSelected Then
        'code here
    End If
Next

 

This is a little simpler:

For Each row In Me.grdProtected.GetRows
    bSelected = row.Cells("selected").Value
 
    If bSelected Then
        'code here
    End If
Next

 

This is the easiest, if you’re trying to get only the rows that are checked. Add a checkbox column to the grid and set it’s ‘actAsSelector’ property to True. Then use this code

For Each row In Me.grdProtected.GetCheckedRows
    strItemNumber = row.Cells("itemnmbr").Value
 
Next
 

Tags:
Categories:
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us