Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. For next loop with DB GRID

For next loop with DB GRID

Scheduled Pinned Locked Moved Visual Basic
cssdatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paps2
    wrote on last edited by
    #1

    Hi all, I would like to use a for next loop with a Datagrid. I have 2 grids in my form. Dbgrid1 and Dbgrid2 In my Dbgrid1 I have 2 cols Col1 has 2A 3B 4C Col2 Has 10 20 30 I want to calculate the total on Col2 using For next eg: for i = 0 to 2 Total = Total + current(col2) next Then: Insert the total in the first row of the second col of my second datagrid: Can some one give me the code. Tnx

    J 1 Reply Last reply
    0
    • P Paps2

      Hi all, I would like to use a for next loop with a Datagrid. I have 2 grids in my form. Dbgrid1 and Dbgrid2 In my Dbgrid1 I have 2 cols Col1 has 2A 3B 4C Col2 Has 10 20 30 I want to calculate the total on Col2 using For next eg: for i = 0 to 2 Total = Total + current(col2) next Then: Insert the total in the first row of the second col of my second datagrid: Can some one give me the code. Tnx

      J Offline
      J Offline
      jlawren7
      wrote on last edited by
      #2

      Sounds like Homework !!!! how are you filling the grids in the first place? a database?, from code? Help is great only if you ask correctly :)

      P 1 Reply Last reply
      0
      • J jlawren7

        Sounds like Homework !!!! how are you filling the grids in the first place? a database?, from code? Help is great only if you ask correctly :)

        P Offline
        P Offline
        Paps2
        wrote on last edited by
        #3

        The grid is populated from the data table.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups