Created
January 3, 2017 17:52
-
-
Save NPS-ARCN-CAKN/1e845dfe3337eb9cd35d39b74512df90 to your computer and use it in GitHub Desktop.
VB .Net Set Up DataGridView Default Values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'https://msdn.microsoft.com/en-us/library/b22t666e(v=vs.110).aspx | |
Private Sub dataGridView1_DefaultValuesNeeded(ByVal sender As Object, _ | |
ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) _ | |
Handles dataGridView1.DefaultValuesNeeded | |
With e.Row | |
.Cells("Region").Value = "WA" | |
.Cells("City").Value = "Redmond" | |
.Cells("PostalCode").Value = "98052-6399" | |
.Cells("Country").Value = "USA" | |
.Cells("CustomerID").Value = NewCustomerId() | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment