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. Adding New Row in Datagridview

Adding New Row in Datagridview

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasewinformsquestion
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.
  • P Offline
    P Offline
    priya_p233
    wrote on last edited by
    #1

    Hi Everyone, i m developing application using vb.net (Winforms). i wnt to add row at bottom (after my existing rows) , in my datagridview when user clicks on edit button. i wrote following code on my edit button after adding all records from my database. dgvTaskList.Rows.Add() but it is adding row at top of all rows & i wnt it at bottom. will anyone tell me wht shuld i do?

    priya

    P X 2 Replies Last reply
    0
    • P priya_p233

      Hi Everyone, i m developing application using vb.net (Winforms). i wnt to add row at bottom (after my existing rows) , in my datagridview when user clicks on edit button. i wrote following code on my edit button after adding all records from my database. dgvTaskList.Rows.Add() but it is adding row at top of all rows & i wnt it at bottom. will anyone tell me wht shuld i do?

      priya

      P Offline
      P Offline
      Polymorpher
      wrote on last edited by
      #2

      I think in the grid property's you can select whether a new row is inserted at the top or bottom. I don't use WinForms very often though so I'm not sure.

      Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so

      1 Reply Last reply
      0
      • P priya_p233

        Hi Everyone, i m developing application using vb.net (Winforms). i wnt to add row at bottom (after my existing rows) , in my datagridview when user clicks on edit button. i wrote following code on my edit button after adding all records from my database. dgvTaskList.Rows.Add() but it is adding row at top of all rows & i wnt it at bottom. will anyone tell me wht shuld i do?

        priya

        X Offline
        X Offline
        xstoneheartx
        wrote on last edited by
        #3

        you can do some things like "Me.DataGridView1.Rows.Insert(..." or check sorting options of your binding source/your datagrid.

        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