Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Possible to refresh datagrid display without refreshing datasource?

$
0
0

I'm stuck on how to refresh the datagrid display after programmatically adding a new row in the grid and without updating the datasource.  I do not want the datasource to be refreshed until the user clicks a Save button.  I just want the user to see the new row.

Here's my code so far:

            MyDataGrid.Rows(index).Cells("Column0").Value = String.Empty
            MyDataGrid.Rows(index).Cells("Column1").Value = "U:"
            MyDataGrid.Rows(index).Cells("Column2").Value = String.Empty

I think this coding is not correct since when Save is clicked, the new row gets added to the datasource.  

I just want to update the display for now.  Possible?

Thanks.



Viewing all articles
Browse latest Browse all 2535

Trending Articles