My problem now is on how can I solve the problem when adding
a new record to my table.
This is my source code that works perfectly if I set the table to
"SchYrSemCourseJoin"
Dim dr As DataRow =
DsStudentCourse1.Tables("SchYrSemCourseJoin").NewRow()
dr("CourseID") = intcourse + 1
DsStudentCourse1.Tables("SchYrSemCourseJoin").Rows.Add(dr)
This code works perfectly if the datamember of my datagrid is set to
"SchYrSemCourseJoin". However because I am using a parent/child form
so the actual datamember of my datagrid is
"Students.StudentsSchYrSem.SchYrSemSchYrSemCourseJoin" and the
datasource is "DsStudentCourse1"
My purpose with this code is to add a new row in a datagrid.
|