Column headerAttributes not working properly

3 posts, 1 answers
  1. phx255
    phx255 avatar
    6 posts
    Member since:
    Feb 2016

    Posted 10 Oct Link to this post

    Hi!, I'm having a problem using headerAttributes on a kendo ui Grid column.

    var columnas = [];

    columnas.push({ 

                  headerAttributes: {                 

          style: "font-size: 14px"               },               title: "Desc",               field: "nombre",               width: 170,                 groupFooterTemplate:

     groupFooterTemplatePadre,

                  footerTemplate: FooterTemplate});

     

    grid = $("#grid").kendoGrid({     dataSource: dataSource,     groupable: false,     pdf: {         allPages: true,         avoidLinks: true,         paperSize: "auto",         margin: { top: "1cm", left: "1cm", right: "1cm", bottom: "1cm" },         landscape: true,         repeatHeaders: false,         scale: 0.4     },     resizable: false,     editable: !viewModelTitulo.cerrada,     selectable: "row",     navigatable: true,     scrollable: true,     columns: columnas,     dataBound: function(e){         var rows = e.sender.tbody.children();         for (var j = 0; j < rows.length; j++) {             var row = $(rows[j]);             var dataItem = e.sender.dataItem(row);             if (dataItem!=null && dataItem.get("nombre").toLowerCase().indexOf("company") >= 0) {                 row.addClass("green");             }         }     }});

     

    using this code on a Kendo ui Grid the column header shows the image attached.

    it's a bug?

    Thanks!

     

     

     

     

  2. phx255
    phx255 avatar
    6 posts
    Member since:
    Feb 2016

    Posted 10 Oct in reply to phx255 Link to this post

    01.  var columnas = [];
    02. 
    03.columnas.push({
    04.               headerAttributes: {
    05.                   style: "font-size: 14px"
    06.               },
    07.               title: "Desc",
    08.               field: "nombre",
    09.               width: 170, 
    10.               groupFooterTemplate: groupFooterTemplatePadre,
    11.               footerTemplate: FooterTemplate});
    12. 
    13. 
    14. 
    15.           grid = $("#grid").kendoGrid({
    16.               dataSource: dataSource,
    17.               groupable: false,
    18.               pdf: {
    19.                   allPages: true,
    20.                   avoidLinks: true,
    21.                   paperSize: "auto",
    22.                   margin: { top: "1cm", left: "1cm", right: "1cm", bottom: "1cm" },
    23.                   landscape: true,
    24.                   repeatHeaders: false,
    25.                   scale: 0.4
    26.               },
    27. 
    28.               resizable: false,
    29.               editable: true,
    30.               selectable: "row",
    31.               navigatable: true,
    32.               scrollable: true,
    33.               columns: columnas,
    34.               dataBound: function(e){
    35.                   var rows = e.sender.tbody.children();
    36. 
    37.                   for (var j = 0; j < rows.length; j++) {
    38.                       var row = $(rows[j]);
    39.                       var dataItem = e.sender.dataItem(row);
    40.                       if (dataItem!=null && dataItem.get("nombre").toLowerCase().indexOf("copasa") >= 0) {
    41.                           row.addClass("conceptoCopasa");
    42.                       }
    43.                   }
    44.               }
    45. 
    46.           });
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 11 Oct Link to this post

    Hello phx255,

    Unfortunately, I'm not able to observe such issue locally using the provided information. Please take a look at this test page. Maybe I'm missing something obvious.

    Regards,
    Rosen
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top