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
25
igHierarchicalGrid
posted

Hi,

I have this code to a igHierarchicalGrid

            $("#hierarchicalGrid").igHierarchicalGrid({
                width: "100%",
                dataSource: data, //Array of objects defined above
                columns: [
                                { key: "Name", headerText: "Name IX", dataType: "string", width: "30%" },
                                { key: "SubName", headerText: "Sub Name IX", dataType: "string", width: "70%" }
                ],
                columnLayouts: [
                    {key: "Products",
                        responseDataKey: "",
                        width: "100%",
                        autoGenerateColumns: false,
                        columns: [
                            { key: "Name", headerText: "Nome", dataType: "string", width: "50%" }
                        ]
                    }],
                autoGenerateLayouts: true
            });



If i declare data this way:

               var data = [
                {
                    Name: "Food",
                    SubName: "SubFood",
                    Products: [
                        { Name: "Bread" },
                        { Name: "Pizza" }
                    ]
                },
                {
                    Name: "Beverages",
                    SubName: "SubBeverages",
                    Products: [
                        { Name: "Milk" },
                        { Name: "Fruit punch" }
                    ]
                }
            ];


It works fine, but if a declare data this way:


   data = [
                                   ["Food1112w", "SubFood", ["Bread1", "Bread1"]],
                                   ["Beverages", "SubBeverages", ["Milk1", "Milk2"]]
                                ];


Just works fine the top rows, but not show the details...


I want to send data this way to save lots of traffic in server... It works fine with igGrids to... Is it possibe to send data this way working with HierarchcalGrids?


Thanks in Advance,

Miguel Oliveira