By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

How to add rows and update datagridview in vs 2005

P: 6
I´m new in .net and i am working with an access database. I have set up my program in many ways, with just code or with the grid datasource set to the database.
I can not add rows or update either ways.
I am looking for simpel way add rows without using «insert into table», because i want the user to fill in the new value in the row.
I have search the planetsource and many other places, and i have found nothing without i«nsert into table» sentence.
Nov 22 '06 #1
Share this Question
Share on Google+
2 Replies

P: 98
hi did u find the way to insert data as well as were u able to update changes to ur access db?
Nov 26 '06 #2

P: 6
hi did u find the way to insert data as well as were u able to update changes to ur access db?
Thank you for your answer.
In the application i wish to buildt, the user adds rows in a plain DataGridView to the tables.

I have found one example that allows me to update and add rows, but get this error message if i try to make a buildt.

Dim UpdatePending As Boolean = False ’ in Public class
Me.OleDbDataAdapter1.Fill(Me.DataSet11.Table1) ’ in form_load
Private Sub ExampleBindingSource_ListChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ListChangedEventArgs) Handles _ BindingSource1.ListChanged
If Me.DataSet11.HasChanges Then
Me.UpdatePending = True
End If
End Sub
Private Sub DataGridView1_RowValidated(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles _ DataGridView1.RowValidated

If UpdatePending Then
Me.UpdatePending = False
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

End Sub

This is the close as I get, i can run the example and add rows and update it but I can not make a build because of this error message:
Argument not specified for parameter ‘includeFilter’ of ‘PublicFunction
GetLastRow(includeFilter As System.Windows.Forms.DataGridViewEleementsStates) As Integer’
Nov 27 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.