I have already tried this w/ dataset but the problem is it doesn't
work w/ the grand child of my relationship
I have ask this before but doesn't recieved any response. here's the
question I made before.
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 to a datagrid.
On Mon, 22 Nov 2004 11:20:50 +0530, "chandan" <(E-Mail Removed)> wrote:
>
>"jaYPee" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> Anyone know how to add record to a datagrid programmatically?
>>
>> Say for example I have two textboxes in my form and a datagrid. When I
>> click a button the value of two textboxes will be added as a new row
>> to my datagrid.
>>
>> Thanks in advance.
>
>HI ,
>Its simple u just put it in DATASET
>and bind the data grid with the dataset
>Add the items in Dataset Datatable
>In data table add new row.
>
|