[Data Grid Reactive] Structure as a source for Data Grid Reactive
Forge component by Bruno Martinho
Application Type
Reactive

Hello!

To begin with, I want to thank the developers for this wonderful component. 

I have a usecase that not described in the component documentation. 

I need to show values that calculates from the entity data. So there are columns which have no correspondence among the entity attributes. I attache OML where you can see 3 screens.

Screen1.

I tried to add calculated attribute to the aggregate:Then data was arranged and put to the grid. After that I defined bindings:

And it worked, but when I tried to add rows and call GetChangedLines action I got an error:

So I tried another way.

Screen2.

I created a structure and used it to prepare my data:

And I put DataStructure variable to the ArrangeData action.

Bindings was changed:
And I got the same result as in the first case.

So I tried to make my structure as similar to the entity as possible.

Screen3.

I added one more tier to the previous structure and changed bindings: 

And I got a new error:I looked at the json and saw that the name of the structure in the metadata is ssTestStr instead of TestStr. So I corrected it: And after that, both the Grid and the GetChangedLines action began to work without errors. Hurray!

So here are my questions:

1. Are there any plans to make the Grid work with different kinds of structures?

2. Is there an easier way to show data in columns which have no correspondence among the entity attributes?

3. Are there any plans to integrate such calculations into the Grid, and if so, what is the approximate time frame?

DataGridTest.oml

Hello @Daryna Kravets,

Thanks for sharing your OML, please give us some time to analyze it.

1. Are there any plans to make the Grid work with different kinds of structures? 

A: The current ArrangeData action has been design to work with Aggregates. I believe it would be simpler, when using Structures, to not use ArrangeData (if you aren't using autogenerated columns). Let me confirm this an share an OML

2. Is there an easier way to show data in columns which have no correspondence among the entity attributes? 

A: Please give us some time to understand if there was any easier way to achieve your use case.

3. Are there any plans to integrate such calculations into the Grid, and if so, what is the approximate time frame? 

A: We are working in designing this feature. Do you have concrete use cases for this?

Thanks,

Bruno Martinho


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.