Search code examples
dojodojox.grid.datagriddojox.grid

Hide Dojo Enhanced grid header name


I have a requirement where I need to hide the DOJO Enhanced grid column name

Ex: look into the jsfiddle link 

http://jsfiddle.net/9dD3C/

Here Column1 Column2 column3 column4 are displayed. My requirement is to hide "Column1" value and make it as blank and retain everything else.


Solution

  • /set up layout/

    var layout = [
      { 'name': 'Column 1','field': 'id', 'width': '100px'},
      {'name': 'Column 2', 'field': 'col2', 'width': '100px'},
      {'name': 'Column 3', 'field': 'col3', 'width': '200px'},
      {'name': 'Column 4', 'field': 'col4', 'width': '150px'}
    ];
    for(var i=0; i<layout.length; i++){
             layout[i].name=[];
    
    }