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. C#
  4. i need some help

i need some help

Scheduled Pinned Locked Moved C#
tutorialquestioncsharpdatabasevisual-studio
3 Posts 3 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.
  • M Offline
    M Offline
    matched
    wrote on last edited by
    #1

    how can i subtract and multiply cells in datagridview in vs 2005 or even in the database...i want for example to add all the cells together and get the result...in short how to make math operations in ado.net applications using DatagridView or something...i hope my question is clear !!!

    G I 2 Replies Last reply
    0
    • M matched

      how can i subtract and multiply cells in datagridview in vs 2005 or even in the database...i want for example to add all the cells together and get the result...in short how to make math operations in ado.net applications using DatagridView or something...i hope my question is clear !!!

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Just use the sum aggregate in an SQL query to sum all records. Example: select sum(price) as total from articles

      --- single minded; short sighted; long gone;

      1 Reply Last reply
      0
      • M matched

        how can i subtract and multiply cells in datagridview in vs 2005 or even in the database...i want for example to add all the cells together and get the result...in short how to make math operations in ado.net applications using DatagridView or something...i hope my question is clear !!!

        I Offline
        I Offline
        InvalidTypecast
        wrote on last edited by
        #3

        When I did that I did something like total += the cell value. I did that from RowAdded or RowDataBound. I can't remember the exact name, but every time a row is added the total would be increased by that cell's amount. Then I output that final value in the datagrid footer.

        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