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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved C#
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.
  • R Offline
    R Offline
    rockz
    wrote on last edited by
    #1

    [Message Deleted]

    S D 2 Replies Last reply
    0
    • R rockz

      [Message Deleted]

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      Hi you have some options. 1) use the fields in your datagrid. Attention, this method might be slow. Just itterate throug your rows: foreach (DataGridViewRow row in settingDataGridView.Rows) { runningtotal += decimal.Parse(row.Cells[columnIndex].ToString(); } 2) get the data from the data behind the DataGridView documentlinebindingsource.EndEdit(); foreach (DataRow row in ds.DocumentLine.Select("documentId=" + documentId)) { if (row.RowState != DataRowState.Deleted) { ds.DocumentLineRow docLineRow = (ds.DocumentLineRow)row; ... runningtotal += row.documentLineTotal; } } Hope this will help you.

      SSK. Anyone who says sunshine brings happiness has never danced in the rain.

      1 Reply Last reply
      0
      • R rockz

        [Message Deleted]

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        You can add a column to your datatable with autoincrement property set to true.This would give you serial number.I haven't tested it but it might work.

        Until you realize this message has nothing to say, its too late to stop reading

        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