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