DataView.RowFilter bug?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Hi Sergey,

I have written examplecode that crashes:
http://195.143.111.151/wince_bug/rowfiltering.zip

1. Run my example, click the button in form1.
2. In form2 click the button (leave the textbox alone).
3. Close form2.
4. Reopen form2 through clicking the button on form1.
5. Click again the button on form2
6. Exception is thrown

I'm using CF.Net SP3, WinCE 4.10 (908) and the programms are running on
"Desno BHT-260BW Scanner Unit"

Regards, Stefan


Sergey Bogdanov said:
Can you provide a complete reproducible example of the error?

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

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
 
Sorry, but I wasn't able to reproduce it. Are you sure that you have SP3?
http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ/DeterminingVersion

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

Hi Sergey,

I have written examplecode that crashes:
http://195.143.111.151/wince_bug/rowfiltering.zip

1. Run my example, click the button in form1.
2. In form2 click the button (leave the textbox alone).
3. Close form2.
4. Reopen form2 through clicking the button on form1.
5. Click again the button on form2
6. Exception is thrown

I'm using CF.Net SP3, WinCE 4.10 (908) and the programms are running on
"Desno BHT-260BW Scanner Unit"

Regards, Stefan


:

Can you provide a complete reproducible example of the error?

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

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
 
Back
Top