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. Visual Basic
  4. How to find the number of rows in a datagrid

How to find the number of rows in a datagrid

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
5 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.
  • C Offline
    C Offline
    chitranjan gohil
    wrote on last edited by
    #1

    Hello, how can i find out the number of rows in a datagrid. Thanx, chitranjan more dash than cash!!!

    A 1 Reply Last reply
    0
    • C chitranjan gohil

      Hello, how can i find out the number of rows in a datagrid. Thanx, chitranjan more dash than cash!!!

      A Offline
      A Offline
      abhinish
      wrote on last edited by
      #2

      after binding the datagrid use this Dim i As Integer i = DataGridView1.DisplayedRowCount(True) MsgBox(i) abhinav

      C 1 Reply Last reply
      0
      • A abhinish

        after binding the datagrid use this Dim i As Integer i = DataGridView1.DisplayedRowCount(True) MsgBox(i) abhinav

        C Offline
        C Offline
        chitranjan gohil
        wrote on last edited by
        #3

        here is datagridview1 the name of the datagrid?my datagrid does not have the property displayrowcount at all. more dash than cash!!!

        A 1 Reply Last reply
        0
        • C chitranjan gohil

          here is datagridview1 the name of the datagrid?my datagrid does not have the property displayrowcount at all. more dash than cash!!!

          A Offline
          A Offline
          abhinish
          wrote on last edited by
          #4

          i m using vs.net 2005 i think u r using vs.net 2003 if u r filling the datagrid from database using dataset here is another way: Dim i As Integer i = CInt(dst.Tables(0).Rows.Count) abhinav

          M 1 Reply Last reply
          0
          • A abhinish

            i m using vs.net 2005 i think u r using vs.net 2003 if u r filling the datagrid from database using dataset here is another way: Dim i As Integer i = CInt(dst.Tables(0).Rows.Count) abhinav

            M Offline
            M Offline
            mayhem_rules
            wrote on last edited by
            #5

            the method suggested by abhinish is the only way to do it in vs.net 2003. With Best Regards, Mayur

            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