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
40
HierarchicalGrid - Columns shifted when datasource changed
posted

Hello there,


I am new to Infragistics, so maybe there's a simple solution I haven't thougt of.
I use the HierarchicalGrid to display data which looks like this:


customerdata = [
        {
            Customer: "Customer-Configuration",
            Data: [
                {
                    "Customer Attribute": "Generics",
                    Configuration: [
                        {
                            Generic: "", Value: ""                  // (2)
                        }
                    ]
                },
                {
                    "Customer Attribute": "Plugin Configuration",
                    Configuration: [
                        {
                            Plugins: "Plugin abc",
                            "Customer Data": [
                                {
                                    "Plugin Attribute": "Config",       // example below (1)
                                    Subconfiguration: [
                                        {
                                            Key: "", Value: ""
                                        }
                                    ]
                                },
                                {
                                    "Plugin Attribute": "Logging",
                                    Subconfiguration: [
                                        {
                                            "Logging Attribute": "", Value: ""          // (3)
                                        },
                                        {
                                            "Logging Attribute": "Additional Targets",
                                            Middlevalue: [
                                                {
                                                    Name: "", "Configuration Info": ""      // (4)
                                                }
                                            ]
                                        }
                                    ]
                                }
                 {
                    "Customer Attribute": "Workflow Configuration",
                    Configuration: [

                    ...                           // same as above

    }

];


The structure of the elements "Plugin Configuration" and "Workflow Configuration" is basically the same, except the word "Plugin" is replaced by "Workflow" in the column-headers.
So far this works fine. But when the datasource ("customerdata") is changed and dataBind is performed, the added or removed element of one section causes the other sections to shift its columns and also show the columns of the changed section.

For example, if you remove an element in the "Subconfiguration" of "Config" (see above (1)), this section remains intact, while most of the others now Show additional columns.
In the other sections (in this case (2) and (3)), the columns usually are shifted to the right and the columns from "Subconfiguration" are inserted/shown on the left (but of course empty). For the sections that are on a lower level (meaning, the sections which are a child of a sibling of the modified section or of the modified section itself) usually are not affected (in this case (4).

This behaviour seems to be not a 100% reproduceable, since the shifting of the columns in the affected sections sometimes are not exactly as discribed, though most of the time they are.

I hope someone here knows how to avoid this behaviour. Thanks in advance for any help.