Maria

Maria

  • NA
  • 64
  • 0

Passing information between forms

Apr 29 2009 6:15 PM

I am trying to pass my grid information from one form (frmSearc) to another form (frmMemberView) but when I do I get an error stating 'Test.frmMemberView.membersBindingSource' is inaccessible due to it protection.

this is a segment of my code:

public void memberDataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)

{

try

{

int memNum = 0;

if (this.membersBindingSource.Position > -1)

{

TrainingDataSet.MembersRow row = default(TrainingDataSet.MembersRow);

row = (TrainingDataSet.MembersRow)((DataRowView)this.membersBindingSource.Current).Row;

memNum = (row.MemberId);

membersBindingSource.Filter = " memberid= '" + memNum + "'";

}

frmMemberView memView = new frmMemberView();

memView.MdiParent = this.MdiParent;

memView.membersBindingSource.Filter = this.membersBindingSource.Filter;

memView.Show();

 

Thank you in advanced


Answers (5)