Page 1 of 1

BindingSource.Filter don't work properly with OracleDataTabl

Posted: Thu 20 Aug 2009 07:57
by maxcpr
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

Posted: Thu 20 Aug 2009 13:58
by Shalex
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.

Posted: Mon 24 Aug 2009 08:21
by maxcpr
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.

Posted: Fri 28 Aug 2009 07:31
by Shalex
We will investigate the issue and notify you about the results as soon as possible.

Posted: Fri 28 Aug 2009 08:09
by Shalex
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"]);