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. Windows Forms
  4. VB.Net Data Grid with Footer

VB.Net Data Grid with Footer

Scheduled Pinned Locked Moved Windows Forms
csharpcss
4 Posts 3 Posters 1 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.
  • F Offline
    F Offline
    Fahim A
    wrote on last edited by
    #1

    Is it possible to have a footer row in VB.Net WinForm. I want to total some columns in a data bound datagrid.

    L 1 Reply Last reply
    0
    • F Fahim A

      Is it possible to have a footer row in VB.Net WinForm. I want to total some columns in a data bound datagrid.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi :) There's no special "footer"-feature in the standard DataGridView. The easiest way to add it would be by adding a second DataGridView below the first one, showing no headers and containing only a single row. You might also want to move the summing-calculation to the database, binding the second grid to it's own query in which you collect the SUM for the columns you requested in the first query.

      I are Troll :suss:

      F 1 Reply Last reply
      0
      • L Lost User

        Hi :) There's no special "footer"-feature in the standard DataGridView. The easiest way to add it would be by adding a second DataGridView below the first one, showing no headers and containing only a single row. You might also want to move the summing-calculation to the database, binding the second grid to it's own query in which you collect the SUM for the columns you requested in the first query.

        I are Troll :suss:

        F Offline
        F Offline
        Fahim A
        wrote on last edited by
        #3

        Thank you shall do that...

        H 1 Reply Last reply
        0
        • F Fahim A

          Thank you shall do that...

          H Offline
          H Offline
          Heinzzy
          wrote on last edited by
          #4

          I'd recommend you to create your own control inherited form DataGrid. It should consist of a DataGrid and your footer (you can create it of textboxes, labels, datagrids etc.) I feel it is nice solution, because you can always replace your component with another one implementing your IDataGridWithFootter. Regards

          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