Print Page | Close Window

Child grid with custom entities (AddRelationView)

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=526
Printed Date: 11-Jun-2026 at 3:03pm


Topic: Child grid with custom entities (AddRelationView)
Posted By: f3rland
Subject: Child grid with custom entities (AddRelationView)
Date Posted: 26-Oct-2007 at 4:25pm
Hi
I'm trying to create a parent/child view with DevExpress.XtraGrid.Views.Grid.GridView using a custom entity. Wacko

My custom entity inherits BindableList(Of CustomType)
The CustomType class have many properties that are entities objects

IE:
Class BindableType (inherits BindableList(Of CustomType))
Class CustomType
    Property EntityTypeOne (DevForce Entity)
    Property EntityTypeTwo (DevForce Entity)
    Property EntityTypeThree (DevForce Entity)

Using IdeaBlade.UI.WinForms.DevExpressControls.XtraGridBindingManager an object of "BindableType" type fill my grid without any problem. I created all EntityPropertyDescriptors related to my "CustomType" properties.

Now i'm trying to "AddRelationView" to my main grid without success.
The relation is between "CustomType.EntityTypeTwo.ID" and "EntityTypeFour.ID"

I'm not able to create the EntityRelation because i do not have any EntityColumns belongs to my "CustomType".

There is a way to AddRelationView from a custom type?

As usual thanks in advance! Geek



Replies:
Posted By: f3rland
Date Posted: 29-Oct-2007 at 11:00am
I found how to do that with these events :
      AddHandler GridViewMain.MasterRowEmpty, AddressOf GridViewMain_MasterRowEmpty
      AddHandler GridViewMain.MasterRowGetLevelDefaultView, AddressOf GridViewMain_MasterRowGetLevelDefaultView
      AddHandler GridViewMain.MasterRowGetRelationCount, AddressOf GridViewMain_MasterRowGetRelationCount
      AddHandler GridViewMain.MasterRowGetRelationName, AddressOf GridViewMain_MasterRowGetRelationName
      AddHandler GridViewMain.MasterRowGetChildList, AddressOf GridViewMain_MasterRowGetChildList

Easy... Cool




Print Page | Close Window