Dynamic grid column based on a one-to-many relationship

Hi there,

I've got a business needs where I have 2 records types (let's call them RT1 and RT2). RT1 has a one-to-many relationship with RT2 and I need to display a grid where my row would be RT1, in which the first 5 columns would be property of RT1 while the following columns would be dynamically added based on possible values of RT2, this mean the number of columns would be equal to the number of properties of RT1 + the number of possible values for RT2.

This could give something like : 

Name Color Brand Model Places Feat1 Feat2 Feat3 Feat4 Feat5
XYZ Blue Ford GT 2 1000 200 500 1500 600
ABC Red Mazda CX-9 7 2500 3000

What would be the best architecture to build that?

  Discussion posts and replies are publicly visible