Kendo grid grouping with multi dimensional

1 Answer 77 Views
Grid
Enrico
Top achievements
Rank 1
Enrico asked on 20 Jan 2023, 06:59 AM | edited on 20 Jan 2023, 07:00 AM

Hi,

I'm trying to plot a multi-dimensional data in a kendo grid with grouping.

Here's sample json data:

[
  {
    "category": "Car",
    "name": "Car1",
    "answer": "",
    "subvalues": [      
{
        "category": "4 wheels",
        "name": "4 wheels 1",
        "answer": ""
      },
{
        "category": "4 wheels",
        "name": "4 wheels 2",
        "answer": ""
      },
{
        "category": "6 wheels",
        "name": "6 wheels",
        "answer": ""
      }
]
  },
  {
    "category": "Car",
    "name": "Car 2",
    "answer": "",
    "subvalues": []
  },
  {
    "category": "Truck",
    "name": "Truck 1",
    "answer": "",
    "subvalues": [
{
"category": "4x4",
    "name": "4x4 Truck 1",
    "answer": ""
},
{
"category": "4x2",
    "name": "4x2 Truck 1",
    "answer": ""
}]
  },
  {
    "category": "Truck",
    "name": "Truck 2",
    "answer": "",
    "subvalues": []
  }
]

As you can see, there's a subvalues which is a sub category and I want to group it as well within the same grid.

 

I'm trying this https://demos.telerik.com/kendo-ui/grid/hierarchy but still no chance.

 

Thanks everyone!

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 24 Jan 2023, 04:54 PM

Hello, Enrico,

Please check this example where the Grid and the Detail Grid are bound from a single json, with the groupable feature enabled.

Let me know how that works for you.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Enrico
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or