BeginFill-blocks thread when BindingSource linked to control

BeginFill-blocks thread when BindingSource linked to control

Postby maxcpr » Thu 21 Jan 2010 13:41

Hi
I met problem :

BeginFill - blocks thread when BindingSource linked to some control.

Example:

this.gridControl1.DataSource = this.V_ALLC_LIENTBindingSource;//line1

this.dataSet1.V_ALL_CLIENT.BeginFill(null, null);

This code blocks the thread.

When i comment line1 - it works fine.

Is it expected behaviour and if it is how i should work this around.

Tnank.

---
More exactly:

That code doesn't block the thread.
As i know when some control linked to a dataSource through BindingSource, it "automaticaly dislinks" ( i'm not shure how exactly explain this) from dataSource when on dataSource invoked some operation that load or change bunch of data (like Fill() operation on DataTable). But in this case it rests linked and when Fill() operation is invoked, gridControl try to treate all events about data changing what consume amount of time and resources. Sorry for this complication, i have wrote how could.
maxcpr
 
Posts: 33
Joined: Wed 10 Dec 2008 14:46

Postby StanislavK » Fri 22 Jan 2010 11:23

When DataTable is binded to a grid, it is necessary to transmit a part of the fetch to the grid to fill its visible area. Thus, filling is asynchronous in both cases, though in the case of binded DataTable it takes more time for initial operations.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby maxcpr » Fri 22 Jan 2010 11:35

StanislavK wrote:When DataTable is binded to a grid, it is necessary to transmit a part of the fetch to the grid to fill its visible area. Thus, filling is asynchronous in both cases, though in the case of binded DataTable it takes more time for initial operations.


Sorry don't understand what you meant.
First case supposed binding to BindingSource and second case is binding to DataTable?

If Grid linked directly to DataTable and then filled, it is clear what it takes much more amount of time than when it linked to BindingSource.

Try this:

gridControl.DataSource = myDataTable;

myDataTable.Fill();//Too0000 much time!

then this:

gridControl.DataSource = new BindingSource(myDataTable, null);

myDataTable.Fill();//Fast and furious:)

Why so? I suppose cause of things what i've described in the post above.
maxcpr
 
Posts: 33
Joined: Wed 10 Dec 2008 14:46

Postby StanislavK » Fri 22 Jan 2010 17:19

I meant cases when DataTable is binded to the grid and when it is not.

Whether the grid is binded to DataTable directly or through DataLink, the BeginFill method should have the same initial delay, which is needed to populate the grid's visible area.

If you observe another behaviour, please describe it in details and send us a test project reproducing the problem.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle