I have a datagridview which is used for listing all the students information .I am using linq to sql as a datasource.My problem arises when I edit a row or add a new row directly in a gridview.I mean there are no any forms for editing or adding student information.User should type on the particular columns to edit or to add a new row.
I found the soultions which uses SqlDataAdapter .
TableAdapter.Update(e.Row); which updates the database.
I wonder how can I achieve the same functionality using linq to sql.
Call the
SubmitChanges()method of theDataContext, which you used to fill theDataGridView.MSDN reference:
http://msdn.microsoft.com/en-us/library/bb292162.aspx