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. Datagridview row delete question

Datagridview row delete question

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

    I have a datagridview that is bound to a datatable in my application. I want to delete a row based on a value in a column. I have the code to remove the row from the datatable and it removes it from the datagridview on the refresh for rows 1-x. Here is my issue when I change the value on the first row(0) to delete it, I can't? Any help would be appreciated.

    N V 2 Replies Last reply
    0
    • K kruegersck

      I have a datagridview that is bound to a datatable in my application. I want to delete a row based on a value in a column. I have the code to remove the row from the datatable and it removes it from the datagridview on the refresh for rows 1-x. Here is my issue when I change the value on the first row(0) to delete it, I can't? Any help would be appreciated.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Clarify what you mean by, "I can't". If the row is deleted properly from the underlying datasource, then it will be removed from grid when properly refreshed.


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • K kruegersck

        I have a datagridview that is bound to a datatable in my application. I want to delete a row based on a value in a column. I have the code to remove the row from the datatable and it removes it from the datagridview on the refresh for rows 1-x. Here is my issue when I change the value on the first row(0) to delete it, I can't? Any help would be appreciated.

        V Offline
        V Offline
        vinod malla
        wrote on last edited by
        #3

        hi i am just a trainee but in my opinion is try to use query as select statement by adding order by to that statement

        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