Many to many relations in hierarchical master detail

Hi,

I have the following db structure (simplified):
Element (hierarchical)
ElementItem (many to many, clustered PK (ElementId, ItemId), FK(ElementId), FK(ItemId))
Item

when I try building a hierarchical master detail page, radzen only offers the follwing child data

  1. Elements
  2. ElementItems

How to get Item into the game?

Scheme:

CREATE TABLE [Info].[Element] (
[ElementId] INT NOT NULL,
[ElementParentId] INT NULL,
[Name] NVARCHAR (150) NOT NULL,
CONSTRAINT [PK_Element] PRIMARY KEY CLUSTERED ([ElementId] ASC),
CONSTRAINT [FK_Element_ElementParent] FOREIGN KEY ([ElementParentId]) REFERENCES [Info].[Element] ([ElementId]),

);

CREATE TABLE [Info].[ElementItem] (
[ElementId] INT NOT NULL,
[ItemId] INT NOT NULL,
CONSTRAINT [PK_ElementItem] PRIMARY KEY CLUSTERED ([ElementId] ASC, [ItemId] ASC),
CONSTRAINT [FK_ElementItem_Element] FOREIGN KEY ([ElementId]) REFERENCES [Info].[Element] ([ElementId]),
CONSTRAINT [FK_ElementItem_Item] FOREIGN KEY ([ItemId]) REFERENCES [Info].[Item] ([ItemId])
);

CREATE TABLE [Info].[Item] (
[ItemId] INT NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
CONSTRAINT [PK_Item] PRIMARY KEY CLUSTERED ([ItemId] ASC),
);

It seems that radzen does not recognize that ElementItem is the linking table in a many to many relationship. Or am I doing anything wrong?

Kind regards,

Marc

Hi Marc,

You are right. At the moment Child Data in New Master/Detail DataGrid or Master/Detail Hierarchy is limited to collections only (Elements and ElementItems):

There is no many-to-many wizard but still you can create manually pages with many-to-many relations. For example Products/Orders in our demo:

Best Regards,
Vladimir