Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

294
Visualizações
Does Kendo Grid support cell merge or not?

My Grid has the following structure

 $("#grid").kendoGrid({
   dataSource: {
       data: data,
       type: 'json'
       },
       pageable: true,
       columns: [
           { field: "SubServiceTypeName", title: "Sub Type" },
           { field: "PrepaidMonthName", title: "Gói dịch vụ" },
           { field: "DeviceName", title: "Tên thiết bị" },
           { field: "DeviceStatusName", title: "Tình rạng" },
           { field: "IsDeployName", title: "Triển khai" },
           { field: "PriceStatementName", title: "CL giá" }
       ]             
 });

Result: enter image description here

I want to merge rows with same value of column [PrepaidMonthName] (call as "Gói dịch vụ"). I don't know if kendo supports merge cells or not yet? What I expect:

enter image description here

Or is there another solution for me to do this?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I found the solution for myself by searching and experimenting, here is the answer to my question: Currently Kendo grid DOES NOT SUPPORT Merge cells yet, so I need to use pure JS to do this. I did the following:

       $("#grid").kendoGrid({
                dataSource: {
                    data: data,
                    type: 'json'
                },
                pageable: true,
                columns: [
                    { field: "SubServiceTypeName", title: "Sub Type" },
                    { field: "PrepaidMonthName", title: "Gói dịch vụ" },
                    { field: "DeviceName", title: "Tên thiết bị" },
                    { field: "DeviceStatusName", title: "Tình rạng" },
                    { field: "IsDeployName", title: "Triển khai" },
                    { field: "PriceStatementName", title: "CL giá" },
                ]
            });
          
            const table = document.querySelector('.k-grid-content table');

            let headerCell = null;

            for (let row of table.rows) {

                const firstCell = row.cells[1];

                if (headerCell === null || firstCell.innerText !== headerCell.innerText) {
                    headerCell = firstCell;
                } else {
                    headerCell.rowSpan++;
                    firstCell.remove();
                }
            }
        });

The result: enter image description here

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda