New Posts New Posts RSS Feed: Child grid with custom entities (AddRelationView)
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Child grid with custom entities (AddRelationView)

 Post Reply Post Reply
Author
f3rland View Drop Down
Newbie
Newbie
Avatar

Joined: 13-Sep-2007
Location: Canada
Posts: 25
Post Options Post Options   Quote f3rland Quote  Post ReplyReply Direct Link To This Post Topic: Child grid with custom entities (AddRelationView)
    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
Back to Top
f3rland View Drop Down
Newbie
Newbie
Avatar

Joined: 13-Sep-2007
Location: Canada
Posts: 25
Post Options Post Options   Quote f3rland Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down