Hi,
We are building a 2-dimensional Grid using the Multicolumn feature and have done some customization to achieve the Y-axis headers as shown on the picture attached. Basically, we just set the class attribute of the y-column to 'k-grid-header'. The data is already aggregated beforehand and we are not using the aggregation feature of the kendo grid.
So, the problem now is that we want to display a dynamic row for Subtotal, per the example, for Brushes (first 2 rows), Cat Food, etc. below the last row for each group. See the second attached file for an edited picture for our desired output. I say dynamic because depending on how our data is set up, the subtotal can be for each column, like this:
Phone Chat
Qty Cost Qty Cost
Brushes 1 2 2 1
Brushes 3 1 2 4
Subtotals: 4 3 4 5
OR it can be a subtotal spanning throughout all the groups on the X-Axis, like this:
Phone Chat
Qty Cost Qty Cost
Brushes 1 2 2 1
Brushes 3 1 2 4
Subtotals: Qty: 8 Cost: 8
By the way, the subtotals are already computed beforehand as well. It is hard to insert a custom row, like just inserting a <tr> tag and just set the class and all, because the data coming in is dynamic. Here's the jsfiddle where the grid column and data is being built from a raw json that our server spits out. The outputs are in the console log. The first array in the console log output is the columns while the second array is the data.
Is there anyway to do this in a Kendo Grid? I'm thinking that this might be beyond what the Grid can support but maybe there is a workaround that might use or a feature that the grid has that supports such scenario.
Thanks
We are building a 2-dimensional Grid using the Multicolumn feature and have done some customization to achieve the Y-axis headers as shown on the picture attached. Basically, we just set the class attribute of the y-column to 'k-grid-header'. The data is already aggregated beforehand and we are not using the aggregation feature of the kendo grid.
So, the problem now is that we want to display a dynamic row for Subtotal, per the example, for Brushes (first 2 rows), Cat Food, etc. below the last row for each group. See the second attached file for an edited picture for our desired output. I say dynamic because depending on how our data is set up, the subtotal can be for each column, like this:
Phone Chat
Qty Cost Qty Cost
Brushes 1 2 2 1
Brushes 3 1 2 4
Subtotals: 4 3 4 5
OR it can be a subtotal spanning throughout all the groups on the X-Axis, like this:
Phone Chat
Qty Cost Qty Cost
Brushes 1 2 2 1
Brushes 3 1 2 4
Subtotals: Qty: 8 Cost: 8
By the way, the subtotals are already computed beforehand as well. It is hard to insert a custom row, like just inserting a <tr> tag and just set the class and all, because the data coming in is dynamic. Here's the jsfiddle where the grid column and data is being built from a raw json that our server spits out. The outputs are in the console log. The first array in the console log output is the columns while the second array is the data.
Is there anyway to do this in a Kendo Grid? I'm thinking that this might be beyond what the Grid can support but maybe there is a workaround that might use or a feature that the grid has that supports such scenario.
Thanks