G
Guest
Hi all,
I have really trouble with my WinCE application. My app is constructed as
follow:
The mainform opens a second form as modal dialog [form2.ShowModelDialog()]
In form2 is a datagrid. The datasource for this grid is a static dataset
from a consts class. To filter rows I set the rowfilter from the DefaultView
of appropriate table.
To better explanation some code:
mainform:
this.dialogPositionen = new form2(drAuftrag);
this.dialogPositionen.ShowDialog();
this.dialogPositionen.Dispose();
this.dialogPositionen = null;
GC.Collect();
GC.WaitForPendingFinalizers();
form2:
cConsts.Dataset.Tables["Artikel"].DefaultView.RowFilter = "(Status<>'A' OR
Status is null) AND AuftragID="+_drAuftrag["ID"].ToString();
cConsts.Dataset.Tables["Artikel"].DefaultView.Sort = "Prioritaet";
this.dataGridPositionen.DataSource =
cConsts.Dataset.Tables["Artikel"].DefaultView;
Running the from2 code the first time work fine. But when I close the modal
dialog and reopen (new instance of form2 !) I get following exception:
Eine nicht behandelte Ausnahme des Typs 'System.ObjectDisposedException' ist
in System.Windows.Forms.dll aufgetreten.
What the hell is going on?!?! I've searching now 8h and I'm getting this not
working!
Thank you for your help!
-Stefan
I have really trouble with my WinCE application. My app is constructed as
follow:
The mainform opens a second form as modal dialog [form2.ShowModelDialog()]
In form2 is a datagrid. The datasource for this grid is a static dataset
from a consts class. To filter rows I set the rowfilter from the DefaultView
of appropriate table.
To better explanation some code:
mainform:
this.dialogPositionen = new form2(drAuftrag);
this.dialogPositionen.ShowDialog();
this.dialogPositionen.Dispose();
this.dialogPositionen = null;
GC.Collect();
GC.WaitForPendingFinalizers();
form2:
cConsts.Dataset.Tables["Artikel"].DefaultView.RowFilter = "(Status<>'A' OR
Status is null) AND AuftragID="+_drAuftrag["ID"].ToString();
cConsts.Dataset.Tables["Artikel"].DefaultView.Sort = "Prioritaet";
this.dataGridPositionen.DataSource =
cConsts.Dataset.Tables["Artikel"].DefaultView;
Running the from2 code the first time work fine. But when I close the modal
dialog and reopen (new instance of form2 !) I get following exception:
Eine nicht behandelte Ausnahme des Typs 'System.ObjectDisposedException' ist
in System.Windows.Forms.dll aufgetreten.
What the hell is going on?!?! I've searching now 8h and I'm getting this not
working!
Thank you for your help!
-Stefan