Databinding and prefetched data

Posts   
 
    
he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 06-Oct-2008 08:06:02   

I have had a look at the tutorial "VS.NET: Design time databinding with windows forms"

I am using Infragistics Grid and I would like to display parent and child rows in the same grid.

If I dynamically bind the grid's datasource to a DataAccessAdapter it works ok.

How can I use an entity collection at design time which requires prefetched data?

he00273
User
Posts: 133
Joined: 02-Oct-2008
# Posted on: 06-Oct-2008 10:10:48   

he00273 wrote:

I have had a look at the tutorial "VS.NET: Design time databinding with windows forms"

I am using Infragistics Grid and I would like to display parent and child rows in the same grid.

If I dynamically bind the grid's datasource to a DataAccessAdapter it works ok.

How can I use an entity collection at design time which requires prefetched data?

I tried the following in the form load event handler

    private void Form1_Load(object sender, EventArgs e)
    {
        PrefetchPath2 CommsPath = new PrefetchPath2((int)EntityType.CasesEntity);
        CommsPath.Add(CasesEntity.PrefetchPathCommunicationsLog);
        adapter.FetchEntityCollection(entityCollection1, null, CommsPath);
    }

seems to work ok. Still feels like I am flying half blind.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 06-Oct-2008 11:57:18   

You've got it right.