471,350 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Windows datagrid binding

Winform datagrid in windows c# app.

i have a student grid (dgStudents) and a student attendance grid (dgAttend)
on a form

outside of the student grid i have a textbox (txtStudentComments)

I want the attendance grid to re-position whenever the student grid row
changes.

I accomplish this with

dgStudents.SetDataBinding(dsRoster,"ERStudent");

then

dgAttend.SetDataBinding(dsRoster,"ERStudent.relStu dentAttendance");

My problem is that in order to make the txtStudentComment value (outside the
student grid) change to the value in dsRoster.Tables["ERStudent"]
corresponding to the current student row in dgStudents, i have to do this:

dgStudents.DataSource = dsRoster.Tables["ERStudent"];

txtStudentComment.DataBindings.Add("Text",dsRoster .Tables["ERStudent"],"COMM
ENTS");

which breaks the positioning of dgAttend with dgStudents!

Any ideas would be greatly appreciated!
Jul 21 '05 #1
0 704

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tom Hughes | last post: by
5 posts views Thread by Jean Carlo | last post: by
5 posts views Thread by Jeff | last post: by
3 posts views Thread by vinayak | last post: by
5 posts views Thread by Brad Shook | last post: by
2 posts views Thread by Brad Shook | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.