Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Complex JSON databinding
posted

Hello,

I am trying to use your iggrid component. 

Below, my dataSource and my columns definition :

dataSource: [
{
"ProductName": "ACACIA - ENV", "BrickId": 20152,
"Fields": [
{ "BrickId": 20152, "DictionaryId": 1617, "IsMultiValued": false, "Label": "Classe d actifs MKG niveau 1", "OrderIndex": 295, "PossibleValues": null, "Type": 95, "Value": { "m_Item1": 551, "m_Item2": "ValueToDisplay" }},
{ "BrickId": 20152, "DictionaryId": 1618, "IsMultiValued": false, "Label": "Classe d actifs MKG niveau 2", "OrderIndex": 297, "PossibleValues": null, "Type": 95, "Value": { "m_Item1": 551, "m_Item2": "ValueToDisplay" }},
{ "BrickId": 20152, "DictionaryId": 1619, "IsMultiValued": false, "Label": "Classe d actifs MKG niveau 3", "OrderIndex": 299, "PossibleValues": null, "Type": 95, "Value": { "m_Item1": 551, "m_Item2": "ValueToDisplay" }}]
}]

columns: [{ "key": "ProductName", "headerText": "Nom produit" },
{ "key": "Fields[0]", "headerText": "Classe d actifs MKG niveau 1", formatter: $scope.getValueFormater},
{ "key": "Fields[1]", "headerText": "Classe d actifs MKG niveau 2", formatter: $scope.getValueFormater },
{ "key": "Fields[2]", "headerText": "Classe d actifs MKG niveau 3", formatter: $scope.getValueFormater }]

I have a problem with the key. If I put "Fields", i have a value. But, if i put "Fields[0]", the value in the formatter function is undefined. 

Is it possible to bind this complex JSON datasource with iggrid ?

What is the procedure to achieve this task?

Thanks for help.

Best regards.

Parents Reply Children
No Data