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. Web Development
  3. ASP.NET
  4. total of columns

total of columns

Scheduled Pinned Locked Moved ASP.NET
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.
  • E Offline
    E Offline
    eng_maioia
    wrote on last edited by
    #1

    i want to sum columns as customer sales1 sales2 sales3 sales4 total john 100 150 100 200 550 Maya 200 100 100 300 700 i want to display the column "total" in the gridview how can i do it with code

    Y S 2 Replies Last reply
    0
    • E eng_maioia

      i want to sum columns as customer sales1 sales2 sales3 sales4 total john 100 150 100 200 550 Maya 200 100 100 300 700 i want to display the column "total" in the gridview how can i do it with code

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      there are a number of ways you can do this. Here is very good http://www.asp.net/learn/data-access/tutorial-11-cs.aspx[^] that shows you different cases

      Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

      1 Reply Last reply
      0
      • E eng_maioia

        i want to sum columns as customer sales1 sales2 sales3 sales4 total john 100 150 100 200 550 Maya 200 100 100 300 700 i want to display the column "total" in the gridview how can i do it with code

        S Offline
        S Offline
        sohighthesky
        wrote on last edited by
        #3

        You can just use this sql: select sales1,sales2,sales3,sales4,sales1+sales2+sales3+sales4 as total from customer

        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