Tuesday, March 20, 2012 2:06 PM
Very new vb.net. I am building a form with text boxes on top and a data grid view on the bottom (parent child). I am using the a sequence (or line number) as the unique identifier for each child row of the parent. My intent was to use either a trigger or a stored procedure or a select statement back to the database to set the next line number/sequence however I cannot find anyway to set the cell value using the stored procedure or select statement and the trigger seems to just be ignored.
Can anyone tell me how to set the value of the line/sequence cell on a new row as soon as the user clicks in the row to add a new row?
Tuesday, March 20, 2012 6:11 PM
try below syntax to set cell value in datagridview
Me.MyGridView.CurrentRow.Cells("DataGridViewTextBoxColumn8").Value = 20
- Marked As Answer by GiberD Friday, March 23, 2012 3:34 PM
Friday, March 23, 2012 3:36 PM
Thanks, the easy answers are sometimes the hardest to find :) This worked just as I wanted.