Hide grouped row and still show ClientGroupFooterTemplate

7 posts, 0 answers
  1. Misahael
    Misahael avatar
    25 posts
    Member since:
    Oct 2013

    Posted 02 Sep 2014 Link to this post

    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
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 04 Sep 2014 Link to this post

    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.

     
  3. Misahael
    Misahael avatar
    25 posts
    Member since:
    Oct 2013

    Posted 04 Sep 2014 Link to this post

    Hi, Illiana

    Thanks for your answer.

    Regards.
  4. Pete
    Pete avatar
    6 posts
    Member since:
    Jul 2013

    Posted 10 Nov 2014 in reply to Iliana Nikolova Link to this post

    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,
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 12 Nov 2014 Link to this post

    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.

     
  6. Pete
    Pete avatar
    6 posts
    Member since:
    Jul 2013

    Posted 12 Nov 2014 in reply to Iliana Nikolova Link to this post

    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?
  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 14 Nov 2014 Link to this post

    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.

     
Back to Top