Closed akashbiz closed 6 years ago
Hi @akashbiz
If there are more than 2 levels of nesting Handsontable won't display the data.
Here we have your tests
(in vanilla, but the logic is the same)
http://jsfiddle.net/jLjyvuet/
if you would like to use (tests[0].Comps[0].Name
for 3rd column you would need to parse the data into 2d array or array of objects first.
Hi @AMBudnik , Thanks for response but I did not understand how you specified columns(in vanilla). Also can please elaborate how to parse the data into 2d array or array of object first?
Is there any way we can get reference of current test while evaluating its columns or any index?
I have also tried to specify data-schema, I thought it may help handson table to parse data in given format but the ng-repeat on Comps array doesn't work only. ng-repeat on other external array ( outside of this tests array ) works and we can get column headers get printed but data binding of those again doesn't work.
<hot-column ng-repeat="obj in resp.Comps" data="obj.Result" title="obj.Name"></hot-column>
in this title field accept obj.Name and display it as col-header but the obj.Result don't display anything.
@AMBudnik Can you share your skype id so that we can discuss it on chat?
If there are more than 2 levels of nesting Handsontable won't display the data.
To your point @AMBudnik , in demo name.first is display but just because it is an array in stead of object it doesn't accept that format and doesn't process an array. Do you think we can overcome this limitation by a minor changes in code?
I will ask our developer for help. Tomorrow or a day after I should get some feedback.
Thanks @AMBudnik, will be waiting for update from developers.
Hi @akashbiz
Unfortunately, Handsontable does not support this data structure. Your Comps
would need to be an object, not an array of objects. We have tried to find a workaround for the issue but none of them was successful.
Ok @AMBudnik , Thanks for your support and time to try and respond back. I will look for some other solution now. Thanks & Regards, Akash.
Oh, and here's a demo http://jsfiddle.net/vzay1jyd/ that shows the table when we change the array of objects to an object
Oh, and here's a demo http://jsfiddle.net/vzay1jyd/ that shows the table when we change the array of objects to an object
This work in case we have only one comp in each test, but there can be more than one comp in each test. So Comps needs to be an array.
Yes, I am sure that the array is needed but there is no way (currently) to load this data. Sorry.
That's ok @AMBudnik, I will look for some other solution. Thanks for your help, support and time.
Hi @warpech @AMBudnik , If I use following input to datarows
then in my code as below:
I am not able to access Comps in second though I can access Name in first . Don't know why is it so? also how can I access a particular test at second if it depends on value of test provided at datarows. Can I get index or current test for which table is getting generated like we get the obj in ng-repeat.
Hoping for a quick response.