BindingSource.Filter don't work properly with OracleDataTabl

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
maxcpr
Posts: 33
Joined: Wed 10 Dec 2008 14:46

BindingSource.Filter don't work properly with OracleDataTabl

Post by maxcpr » Thu 20 Aug 2009 07:57

Hi
There is a problem with BindingSource

In my project i have 2 binding sources, binded to one data table

this.testBindingSource1.DataMember = "Test";
this.testBindingSource1.DataSource = this.dataSet1;

this.testBindingSource2.DataMember = "Test";
this.testBindingSource2.DataSource = this.dataSet1;

this.gridView1 = this.testBindingSource1;
this.gridView2 = this.testBindingSource2;



///// Now i want to show in second grid only one row.
this.testBindingSource2.Filter = "ID = 0"

But suddenly first grid also show me only one row. Looks like this.testBindingSource1 also have the same filter but if i see Filter property it still null. There is problem here?

Thank

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 20 Aug 2009 13:58

This is a BindingSource issue. These two BindingSources use the same internal view. We recommend you to use our DataLink component, it has the SeparateEditing property. Please set it to true for dataLink2 in your case.

maxcpr
Posts: 33
Joined: Wed 10 Dec 2008 14:46

Post by maxcpr » Mon 24 Aug 2009 08:21

Hi.
Thank for responce.

But if i use standart Microsoft DataSet & DataTables all work as way as i intend. (i.e. each Filter affect only proposed DataBindings). And DataLink solution don't fit for my model because i use this in classes which supposed to work both with standard microsoft classes and yours ones.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 28 Aug 2009 07:31

We will investigate the issue and notify you about the results as soon as possible.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 28 Aug 2009 08:09

OracleDataTable doesn't work with BindingSource like Microsoft's DataTable. BindingSource doesn't create a separate view for every Source. System.DataTable makes this. It is impossible to use only View without BindingSource or additional objects. We had rejected this approach. It is necessary to split a view explicitly when working with our OracleDataTable:

Code: Select all

     this.testBindingSource1.DataSource = new Devart.Common.DbDataTableView((Devart.Common.DbDataTable)dataSet1.Tables["Dept"]);
      this.testBindingSource2.DataSource = new Devart.Common.DbDataTableView((Devart.Common.DbDataTable)dataSet1.Tables["Dept"]);

Post Reply