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. Datagrid Refresh Problem

Datagrid Refresh Problem

Scheduled Pinned Locked Moved Visual Basic
cssdatabasewpfgraphicsjson
2 Posts 2 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.
  • J Offline
    J Offline
    jzwiers
    wrote on last edited by
    #1

    I crated a datagrid and I program the DataGridTableStyle in code for the datagrid to set the display format. I also have a delete button on the form. The problem is a ghost graphics of the selected cell is left behind after the row in the datagrid has been deleted. I will explain: 1. I initially display all the rows in the datagrid 2. I click on a cell (4,1) for that row to be deleted 3. I click on the delete button which deletes the row/record from the db and reloads the dataset and the datagrid with the updated information 4. When the datagrid is repopulated, there are only 3 rows (this is correct), but the selected cell (4,1) is still showing on the grid. The rest of the data for row 4 is gone. Just that single cell is still showing. I have tried clearing out the table styles, but that did not work. Any suggestions? Thanks in advanced Jeffrey

    H 1 Reply Last reply
    0
    • J jzwiers

      I crated a datagrid and I program the DataGridTableStyle in code for the datagrid to set the display format. I also have a delete button on the form. The problem is a ghost graphics of the selected cell is left behind after the row in the datagrid has been deleted. I will explain: 1. I initially display all the rows in the datagrid 2. I click on a cell (4,1) for that row to be deleted 3. I click on the delete button which deletes the row/record from the db and reloads the dataset and the datagrid with the updated information 4. When the datagrid is repopulated, there are only 3 rows (this is correct), but the selected cell (4,1) is still showing on the grid. The rest of the data for row 4 is gone. Just that single cell is still showing. I have tried clearing out the table styles, but that did not work. Any suggestions? Thanks in advanced Jeffrey

      H Offline
      H Offline
      Het2109
      wrote on last edited by
      #2

      Try taking the cursor postion from that cell to other cell or other control. Hope you are again binding the grid as data will be deleted physically from the table. Het Waghela :)Be Humble in Victory and Strong in Defeat.:) Het Waghela, Blog|Het Waghela DotNet Questions Link|More Links

      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