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. How to get the Maximum of Value of In a Rows in DataGridView

How to get the Maximum of Value of In a Rows in DataGridView

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 5 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.
  • N Offline
    N Offline
    nassimnastaran
    wrote on last edited by
    #1

    Hi ! Is There Help to Find the Maximum Value in A Row of A DataGridView . Thanks In Advance !

    L P L 3 Replies Last reply
    0
    • N nassimnastaran

      Hi ! Is There Help to Find the Maximum Value in A Row of A DataGridView . Thanks In Advance !

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      No. A DataGridView just holds Columns, it does not assume those Columns hold data types that are comparable amongst themselves. :)

      Luc Pattyn [My Articles] Nil Volentibus Arduum

      1 Reply Last reply
      0
      • N nassimnastaran

        Hi ! Is There Help to Find the Maximum Value in A Row of A DataGridView . Thanks In Advance !

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

        You'll have to teach it how.

        R 1 Reply Last reply
        0
        • N nassimnastaran

          Hi ! Is There Help to Find the Maximum Value in A Row of A DataGridView . Thanks In Advance !

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

          DataGridView was not designed for data manipulation. I would suggest you write an SQL query or Stored procedure that uses the MAX function and then call it with the Command.ExecuteScalar() method.

          N 1 Reply Last reply
          0
          • P PIEBALDconsult

            You'll have to teach it how.

            R Offline
            R Offline
            Reiss
            wrote on last edited by
            #5

            who's a good datagrid, here have a nice treat ;)

            1 Reply Last reply
            0
            • L Lost User

              DataGridView was not designed for data manipulation. I would suggest you write an SQL query or Stored procedure that uses the MAX function and then call it with the Command.ExecuteScalar() method.

              N Offline
              N Offline
              nassimnastaran
              wrote on last edited by
              #6

              Quote:

              You'll have to teach it how.

              Yes , You are Right ! :-\ in fact I shouldn't to use any database , otherwise , it was simple than i want to do this now ! in any case I should do it with help u ! 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