Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB8.Net Bound DatagridView “ADD” Data Rows Problem

Status
Not open for further replies.

paulgenga

Programmer
Jan 8, 2004
61
KE
Jambo,

What I need is to have values held…be pasted on to the (New Record) Row of a Bound DatagridView on to respective columns programmatically.

The closest syntax could be as seen below but this is only applicable for unbound DatagridView's.
Code:
With DatagridView1.Rows
	.ADD (col1, col2, col3, etc)
End With

I am not comfortable enough to work with unbound controls in updating datasets.
The unhandled error msg. on attempting to use the code above on a bound DatagridView is: rows cannot be added on to bound DatagridView.


I believe there is a way perhaps through the BindingSource or TableAdapter which I could not pick. I tried the “Insert” method on the TableAdapter, this resulted in to direct update. Bypassing the user save button and not immediately viewed.

Please guide, thank you

PG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top