Infragistics UltrGrid Binging (multiple Bands)

Posts   
 
    
ftuttle
User
Posts: 40
Joined: 10-Dec-2006
# Posted on: 25-Jul-2009 01:13:06   

Adapter v2.6.

Several questions here:

I am binding to an Entity Collection

Private _ecREO As New EntityCollection(Of RealEstateOwnedEntity)(New RealEstateOwnedEntityFactory())

The RealEstateOwned table in the DB has 5 child 1:m table relationships.

Using a BinndingSource against the parent table, the ultragrid picks up all of the related entities as bands (so I have 5 bands - everything is good so far).

Now I go and load this entity collection:

    Dim sorter = New SortExpression(New SortClause(RealEstateOwnedFields.BorrowerId, Nothing, SortOperator.Ascending))
    Dim filter As IPredicate = (RealEstateOwnedFields.BorrowerId = _Nav.BorrowerId)
    Dim bucket As IRelationPredicateBucket = New RelationPredicateBucket()
    bucket.PredicateExpression.Add(filter)

    _Adapter.FetchEntityCollection(_ecREO, bucket, 0, sorter)

    Me.BSREO.DataSource = _ecREO

=====================================

I don't see how to reference the related entities in _ecREO. They appear in the grid.

I came across "getMulti" in some Help but I can't find it anything like it when I inspect either the "_ecREO" object or the individual entities.

I want to make sure I am properly deleting entities based on the Grid delete event.

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Jul-2009 18:42:17   

Hi there,

Ok, Lets go step by step.

  1. You are using Adatper, right? As you mention GetMulti which is specific to SelfServicing, I get confused.

  2. Before use things on related entity (the childs of _ecREO, for instance) you need to prefetch them. Please take a look at PrefetchPaths.

  3. One you prefetched/fetched entities, now all is about databinding. I would like to see how are you displaying or configuring the binding of the child entities.

David Elizondo | LLBLGen Support Team
ftuttle
User
Posts: 40
Joined: 10-Dec-2006
# Posted on: 28-Jul-2009 07:44:38   

daelmo wrote:

Hi there,

Ok, Lets go step by step.

  1. You are using Adatper, right? As you mention GetMulti which is specific to SelfServicing, I get confused.

  2. Before use things on related entity (the childs of _ecREO, for instance) you need to prefetch them. Please take a look at PrefetchPaths.

  3. One you prefetched/fetched entities, now all is about databinding. I would like to see how are you displaying or configuring the binding of the child entities.[/quote]

===================================================================

Thanks for your response. Attached is a jpg of the Win UI. I will be doing a lot more work to make it look cleaner. I was thinking of having more of a tree (Grid) approach because of the way the data is related.

See the attachment for the view of the UI.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 28-Jul-2009 10:38:59   

The UI is not clear to me, but as far as I understand, PrefetchPaths (indeed) are all what you need to fetch the related entities.

ftuttle
User
Posts: 40
Joined: 10-Dec-2006
# Posted on: 28-Jul-2009 17:09:25   

Thankyou.

ftuttle
User
Posts: 40
Joined: 10-Dec-2006
# Posted on: 29-Jul-2009 02:22:48   

Sorry to belabor this:

When I start to modify my code and add the following line in the VS editor:

Dim prefetchPath As IPrefetchPath2 = New PrefetchPath2(CType(EntityType.RealEstateOwnedEntity, Integer))

The section "EntityType" is underlined and the message:

"Name 'EntityType' is not declared."

I am referenceing the following:

Imports SD.LLBLGen.Pro.ORMSupportClasses Imports ForensicDB.EntityClasses Imports ForensicDB.DatabaseSpecific Imports ForensicDB.HelperClasses Imports ForensicDB.FactoryClasses

I went back and reviewed the classes I am generating and even added all of the options but i cant seem to identify what I am missing. the help file doesnt identify what references are required or when code gen options are needed to use the example code.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Jul-2009 08:25:21   

You can just right click it and select Resolve from the IDE context menu.

EntityType is defined under your root namespace.

Imports ForensicDB