Imagine that we have table with some data ( attached file: img1.png )
Using this data I created pivotDataSource for my Kendo pivotGrid like this:demo
As we can see our data looks like:
For each question property we use only one answer, and our model looks like:
But if I want to use table with data wich will look like: ( attached file: img2.png )
I must separate this data in this way: (find all possible combinations for answers): ( attached file: img3.png )
And only after that I can create someData js obj as we saw above.
for our pivotGrid.
The problem is, that we can have many questions ( 100+ questions) and for each question we can have ( 1-5+ answers) , so if I'll have in my row 5 answers for each question I must create (5*100)! unique combinations of answers, and after that i can create data for my pivotGrid where each data item will have one answer for one question.
Why I must do that ?
According to documentation Kendo dose not allow us to use Array type in model, so we cant write like this:
So my questions are: 1) Does kendo have mechanism which allow me use array in my model. For example i will give it data wich will looks like:
and it will build me pivot grid like this: ( attached file: img4.png )
but not like this ( attached file: img5.png )
2.Maybe you can advise me another solution to solve this problem with data separation. For example can we create a pivot grid configurator UI where we can choose only two items (two questions) (one for column , one for row), and after that , we will calculate all possible combinations of theirs answers , and after that we can use this data for our pivot grid.In other words: can we initialize our kendo pivot grid and kendo pivot grid configurator using one dataSource after that detect wich data was dropped in columns and rows after that make some calculations and prepare another dataSource ( using this dropped data) and replace old dataSource using new dataSource .Maybe you can advise me another solution to solve this problem with data separation.Thank you.