This is a migrated thread and some comments may be shown as answers.

Grouped Column rather than Group Header

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cara
Top achievements
Rank 1
Cara asked on 21 Jan 2014, 03:44 PM
The viewmodel my grid is bound to has 3 levels of hierarchy, so I end up with 2 nested grids. In the middle level, I have grouping in place. I need to display 3 different links for the group. Currently, I am taking advantage of the grouping header option. However, I would rather have an additional column in that grid with a rowspan to cover the group rather than the header. Is there any way to accomplish this without overriding multiple aspects of the kendo framework or completely moving away from kendo?
jsfiddle: http://jsfiddle.net/jJRsr/2/

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 22 Jan 2014, 12:11 PM
Hi Cara,

Although this behavior is currently not supported out of the box, it could be achieved using a custom solution. Basically you could subscribe to the parent Grid's detailExpand event. Once the event is triggered you can use jQuery to append a tr element to the child Grid's table element. For example:  
detailExpand: function (e) {
    var childGrid = e.detailRow.find(".lineitems").data("kendoGrid");
    var newCell = $("<td colspan='4'></td>").text("This is where the buttons could be added"); 
    var newRow = $("<tr></tr>").addClass("k-master-row").attr("role", "row").css({height: "30px"}).append(newCell);
    ...
   
}


Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Cara
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or