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

Hide grouped row and still show ClientGroupFooterTemplate

6 Answers 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Misahael
Top achievements
Rank 1
Misahael asked on 02 Sep 2014, 06:15 PM
Hi,

I wonder if it's possible to hide a row when I'm grouping the results by column but still showing the ClientGroupFooterTemplate in my case is "Subtotal".

I attach a image to explain better the scenario.

And here's my code

@(Html.Kendo().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Template(t => { }).Title("N°").ClientTemplate("#= renderRecordNumber(data) #").Width(40);
            columns.Bound(p => p.ID_SOLICITUDSERVICIO).Visible(false);
            columns.Bound(p => p.ID_PARTESERVICIO).Visible(false);
            columns.Bound(p => p.NOMBRE_EMPRESA).Title("Cliente");
            columns.Command(command => command.Custom("custom").Text("").Click("MostrarSolicitud")).Title("N°solicitud").Width(75);
            columns.Bound(p => p.SOLICITUD_CLIENTE).Title("ODT");
            columns.Bound(p => p.NOMBRE_ESTADOSOLICITUD).Title("Estado");
            columns.Bound(p => p.SFECHA_INICIO).Title("Fecha inicio");
            columns.Bound(p => p.SFECHA_FIN).Title("Fecha fin");
            //columns.Bound(p => p.SHORA_INICIO).Title("Hora inicio");
            //columns.Bound(p => p.SHORA_FIN).Title("Hora fin");
            columns.Bound(p => p.NOMBRE_TIPOSERVICIO).Title("Tipo servicio");
            columns.Bound(p => p.NOMBRE_MARCA).Title("Marca");
            columns.Bound(p => p.NOMBRE_MODELO).Title("Modelo");
            columns.Bound(p => p.SERIE_INVENTARIO).Title("N°serie");
            columns.Bound(p => p.DOCUMENTOS_PROCESADOS).Title("Doc. procesados")
                .ClientFooterTemplate("Total: #=sum#")
                .ClientGroupFooterTemplate("Subtotal: #=sum#");
            columns.Bound(p => p.NOMBRE_UBICACION).Title("Ciudad Atención");
            columns.Bound(p => p.TECNICO_RESPONSABLE).Title("Técnico responsable");
            columns.Bound(p => p.NUMERO_TECNICOS).Title("N°técnicos");
            columns.Bound(p => p.TOTAL_HORAS).Title("Total de horas")
                .ClientFooterTemplate("Total: #=kendo.toString(sum, 'n2')# h")
                .ClientGroupFooterTemplate("Subtotal: #=kendo.toString(sum, 'n2')# h");
            columns.Bound(p => p.FACTURA_PARTESERVICIO).Title("N°factura");
        })
                       .Sortable()
                       .Pageable(m => m.PageSizes(new int[] { 10, 20, 50, 100 }))
                       .Groupable()
                       .Filterable()
                       .Events(e => { e.DataBound("dataBound"); })
                       .Scrollable(s => s.Height("auto"))
                       .TableHtmlAttributes(new { style = "table-layout: fixed;" })
                       .Resizable(r => r.Columns(true))
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .Events(ev =>
                    {
                        ev.RequestStart("Load");
                        ev.RequestEnd("Ready");
                    })
                                   .Aggregates(aggregates =>
                                   {
                                       aggregates.Add(m => m.DOCUMENTOS_PROCESADOS).Sum();
                                       aggregates.Add(m => m.TOTAL_HORAS).Sum();
                                   })
                           .Read(read => read.Action("LeerExt_MatrizServicios", "Consultas").Data("getParameter"))
               )
               .ToolBar(toolBar =>
                    toolBar.Custom()
                        .Text("Exportar a PDF")
                        .HtmlAttributes(new { id = "export" })
                                .Url(Url.Action("ExportarPDFMatrizServicios", "Consultas",
                                new
                                {
                                    page = 1,
                                    pageSize = "~",
                                    filter = "~",
                                    sort = "~",
                                    txtFechaInicio = "~",
                                    txtFechaFin = "~",
                                    txtHoraInicio1 = "~",
                                    txtHoraInicio2 = "~",
                                    id_procedenciaequipo = "0",
                                    id_cliente = "0",
                                    id_localidadequipo = "0",
                                    id_unidadnegocio = "0",
                                    id_tecnico = "0",
                                    varios_tecnicos = "0",
                                    id_tiposervicio = "0",
                                    id_marca = "0",
                                    id_modelo = "0",
                                    id_serieequipo = "0",
                                    id_estadosolicitud = "0",
                                    id_tipoatencion = "0",
                                    id_bodega = "0",
                                    uso_repuesto = "0",
                                    id_repuesto = "0",
                                    AtencionMayor = " ",
                                    AtencionMenor = " ",
                                    partes_facturados = " ",
                                    id_tecnico_involucrado = "0",
                                    nombre_cliente = " ",
                                    nombre_tecnico = " ",
                                    nombre_servicio = " ",
                                    estado_solicitud = " ",
                                    nombre_tecnico_involucrado = " ",
                                    unidad_negocio = " "
                                }))
                )
                .ToolBar(toolBar =>
                    toolBar.Custom()
                        .Text("Exportar a Excel")
                        .HtmlAttributes(new { id = "exportex" })
                                .Url(Url.Action("ExportarExcelMatrizServicios", "Consultas",
                                new
                                {
                                    page = 1,
                                    pageSize = "~",
                                    filter = "~",
                                    sort = "~",
                                    txtFechaInicio = "~",
                                    txtFechaFin = "~",
                                    txtHoraInicio1 = "~",
                                    txtHoraInicio2 = "~",
                                    id_procedenciaequipo = "0",
                                    id_cliente = "0",
                                    id_localidadequipo = "0",
                                    id_unidadnegocio = "0",
                                    id_tecnico = "0",
                                    varios_tecnicos = "0",
                                    id_tiposervicio = "0",
                                    id_marca = "0",
                                    id_modelo = "0",
                                    id_serieequipo = "0",
                                    id_estadosolicitud = "0",
                                    id_tipoatencion = "0",
                                    id_bodega = "0",
                                    uso_repuesto = "0",
                                    id_repuesto = "0",
                                    AtencionMayor = " ",
                                    AtencionMenor = " ",
                                    partes_facturados = " ",
                                    id_tecnico_involucrado = "0",
                                    nombre_cliente = " ",
                                    nombre_tecnico = " ",
                                    nombre_servicio = " ",
                                    estado_solicitud = " ",
                                    nombre_tecnico_involucrado = " ",
                                    unidad_negocio = " "
                                }))
                )
                .ToolBar(toolBar =>
                    toolBar.Custom().Text("Imprimir").Url("#").HtmlAttributes(new { @class = "btnImprimir" }))
           )

Thanks for the help I hope it's possible

6 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 04 Sep 2014, 12:41 PM
Hi Christian,

This scenario is not supported in the current version of Kendo UI Grid, however its implementation is planned for Q3 2014 release, due in mid November (link).

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Misahael
Top achievements
Rank 1
answered on 04 Sep 2014, 02:43 PM
Hi, Illiana

Thanks for your answer.

Regards.
0
Pete
Top achievements
Rank 1
answered on 11 Nov 2014, 03:39 AM
Ilianna,

I am running the Q3 2014 beta and it still has this issue where the group footer does not display when the group is collapsed. Even the Q3 2014 grid demo (aggregates) has the same issue. Can you confirm this is fixed in Q3 2014? Is there something that needs to be set? 

Thanks,
0
Iliana Nikolova
Telerik team
answered on 12 Nov 2014, 02:11 PM
Hi Pete,

The group footers visibility can be configured via the groupable.showFooter property (dojo example). 

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Pete
Top achievements
Rank 1
answered on 13 Nov 2014, 12:36 AM
I dont see that as an option in the asp.net mvc helper. Can you tell me if this is available using the asp.net mvc helper function?
0
Iliana Nikolova
Telerik team
answered on 14 Nov 2014, 08:38 AM
Hi Pete,

This option will work with the ASP.NET MVC wrapper of Kendo UI Grid for the Q3 RTM release (due in about a week).

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Misahael
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Misahael
Top achievements
Rank 1
Pete
Top achievements
Rank 1
Share this question
or