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 1st, 2004, 05:40 AM
Authorized User
 
Join Date: Sep 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default flexiGrid vs Datagrid

In VB6 I used a flexigrid control from Component One, I could access cells using the textMatrix property and then set the cell to a value.

    For iIndex = 1 To flexiGrid.Rows - 1
        flexiGrid.TextMatrix(iIndex, 2) = False
    Next

How is this done with a data grid, how could I iterate through the grid cells and access them?

the best I can come up with so far is from the following link from Microsoft

'http://msdn.microsoft.com/msdnmag/issues/02/07/AdvancedBasics/default.aspx
 Function ShowDSInOutputWindow(ByVal ds As DataSet, Optional ByVal sTable As String = "")
    'Generic DataSet debug function
    Dim cldebug As DataColumn
    Dim tbdebug As DataTable
    Dim rw As DataRow

    If sTable = "" Then
      tbdebug = ds.Tables(0)
    Else
      tbdebug = ds.Tables(sTable)
    End If

    Debug.WriteLine("——————————— ——————")
    Debug.WriteLine(vbTab & vbTab & "DS Table: " & tbdebug.ToString())
    Dim bFirst As Boolean = True

    For Each rw In tbdebug.Rows
      If bFirst Then
        For Each cldebug In tbdebug.Columns
          If cldebug.DataType.Name <> "Byte[]" Then
            Debug.Write( _
              cldebug.ColumnName & vbTab)
          End If
        Next cldebug
        Debug.WriteLine("")
        bFirst = False
      End If

      For Each cldebug In tbdebug.Columns
        If cldebug.DataType.Name <> "Byte[]" Then
          Debug.Write(rw.Item(cldebug) & vbTab)
        End If
      Next cldebug
      Debug.WriteLine("")
    Next
    Debug.WriteLine("——————————— ——————")
  End Function


Regards






Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
Datagrid k.manisha ASP.NET 1.0 and 1.1 Professional 2 May 20th, 2008 07:18 PM
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
Creating DataGrid In Repeater/DataGrid liduwan ASP.NET 1.0 and 1.1 Professional 9 March 6th, 2007 03:31 PM
datagrid ajaidass ADO.NET 2 March 1st, 2007 05:36 PM





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