سلام
من تونستم بين table هام relation برقرار كنم ( از طريق designer) ولي وقتي توي جدول master حركت ميكنم هيچ حركتي توي detail نمي بينم
Printable View
سلام
من تونستم بين table هام relation برقرار كنم ( از طريق designer) ولي وقتي توي جدول master حركت ميكنم هيچ حركتي توي detail نمي بينم
بجای اینکه دیتا گریدت را به جدول detail بایند کنی به DataRelation بین آنها بایند کن :
How to: Create a Master/Detail Form Using Two Windows Forms DataGridView Controls
اگر از Typed Dataset استفاده کرده ای. یک Relation بین دو تا DataTable ات قرار بده و
// Bind the master data connector to the Customers table.
masterBindingSource.DataSource = data;
masterBindingSource.DataMember = "Customers";
// Bind the details data connector to the master data connector,
// using the DataRelation name to filter the information in the
// details table based on the current row in the master table.
detailsBindingSource.DataSource = masterBindingSource;
detailsBindingSource.DataMember = "نام ریلیشن";
http://msdn.microsoft.com/en-us/libr...28(VS.71).aspx
این دو لینکی که در دو پست قبلی دادم را به خوبی مطالعه کن. مشکلت حل می شود.