Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Show/Hide Columns Dynamically

$
0
0

The issue stems from when you apply a headerAttribute or attribute style within the columns definition. When this is removed, the show/hide functionality works as expected. 

         var regionHeaderStyle = {
            "class": "name-header-region",
            style: "text-align:right; font-weight:bold;"
        };

        var regionCellStyle = {
            "class": "name-region",
            style: "width:font-size:10px"
        }


        var centerStyle = {
            "class": "name-header-center",
            style: "text-align:center; font-weight:bold;"
        };

        var cellStyle = {
            "class": "name-cell",
            style: "text-align: right; font-size:11px;"
        }

 $("#treelist").kendoTreeList({
            dataSource: dataSource,
            selectable: true,     
            columns: [{
                field: "GeogDesc",
                title: "Region",
                headerAttributes: regionHeaderStyle,
                attributes: regionCellStyle
            }, {
                field: "DispPYTD",
                title: "Disp PYTD",
                headerAttributes: centerStyle,
                attributes: cellStyle
            }]
        });




Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>