handsontable / ngHandsontable

Official AngularJS directive for Handsontable
http://handsontable.github.io/ngHandsontable/
MIT License
433 stars 159 forks source link

How to access index of dataRow getting iterated #232

Closed akashbiz closed 5 years ago

akashbiz commented 6 years ago

Can I get the index of item among db.items while hot-column being evaluated? Also, can I get some suggestion regarding how I print table like this:


       Test Name       Comp1          Comp2           . . .     Comp(n)
1      Test1           Checked        Unchecked                 Checked
2      Test2           -              Checked                   Unchecked
.
.
.
x      Test(x)         Unchecked      -                         Checked

from data like: Response =

{
Tests : [
    {
        'Name' : "Test1",
        'Comps' : [
            {
                'Name' : 'Comp1',
                'Tests': [
                    {
                        'Name' : 'Test1',
                        'Available': True,
                        'Result': True
                    },
                    {
                        'Name' : 'Test2',
                        'Available': False,
                        'Result': False
                    },
                    {
                        'Name' : 'Test(x)',
                        'Available': True,
                        'Result': False
                    }
                ]
            },
            {
                'Name' : 'Comp2',
                'Tests': [
                    {
                        'Name' : 'Test1',
                        'Available': True,
                        'Result': False
                    },
                    {
                        'Name' : 'Test2',
                        'Available': True,
                        'Result': True
                    },
                    {
                        'Name' : 'Test(x)',
                        'Available': False,
                        'Result': False
                    }
                ]
            },
            {
                'Name' : 'Comp(n)',
                'Tests': [
                    {
                        'Name' : 'Test1',
                        'Available': True,
                        'Result': True
                    },
                    {
                        'Name' : 'Test2',
                        'Available': True,
                        'Result': False
                    },
                    {
                        'Name' : 'Test(x)',
                        'Available': True,
                        'Result': True
                    }
                ]
            }
        ]
    }
]
}

HTML Code:

<hot-table settings = "{rowHeaders: true, colHeaders: true, manualRowMove: true, manualColumnMove: true}"
           datarows="Response.Tests">
    <hot-column data="Name" title="'Test Name'" type="grayedOut" read-only></hot-column>
    <hot-column ng-repeat="comp in Comps" data="??" type="'checkbox'" title="comp.Name"></hot-column>
</hot-table>

What should be there in place of question mark to access Binary Result of each test against each comp as checkmark?

akashbiz commented 6 years ago

Hello, Any updates on this @AMBudnik ?

AMBudnik commented 6 years ago

sorry for 'not so useful' and slow replies. We do not update the project. It is still maintained but the last version of Handsontable that is supported in more than a year old and no one tested it with the current version of Handsontable PRO or CE.

akashbiz commented 6 years ago

Hi @AMBudnik, Even a version updated a year ago would help us to integrate it with angular1.x but can you just help me out with what kind of data it may support if I have draw 2X2 metrix dynamically? Thanks & Regards, Akash

AMBudnik commented 6 years ago

Yes. It has been mentioned in the second post. I have asked our developer to check it.

akashbiz commented 6 years ago

Ok, Thanks @AMBudnik