CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: VB.NET

Getting the select row from DataGrid

89 Views
Copy Code Show/Hide Line Numbers
   1:  Dim rowIndex As Integer = InvoiceLineItemsDataGridView.Rows.Count - 1
   2:              Dim row As DataGridViewRow _
   3:                  = InvoiceLineItemsDataGridView.Rows(rowIndex)
   4:              Dim cell As DataGridViewCell
   5:              cell = row.Cells(0)
   6:              cell.Value = 1
   7:              invoiceSequence += 1
   8:              cell = row.Cells(1)
   9:              cell.Value = invoiceSequence
  10:              cell = row.Cells(2)
  11:              cell.Value = AccountNoComboBox.SelectedValue
  12:              cell = row.Cells(3)
  13:              cell.Value = AccountNoComboBox.Text
  14:              cell = row.Cells(4)
  15:              cell.Value = DescriptionTextBox.Text
  16:              cell = row.Cells(5)
  17:              cell.Value = AmountTextBox.Text
by mbbrennan
  January 05, 2010 @ 9:57pm

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate