How to make empty rows not visible in dojo Datagrid
<p>I have 2 header rows in my grid.The problem is, that because of this, there is another row in my Grid, unter my row with data. Here's my grid after rendering:</p>

<p><a href="https://i.stack.imgur.com/fHCRk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fHCRk.png" alt="enter image description here"></a></p>

<p>grid = new dojox.grid.DataGrid({
                    id : OwnId,
                    store : gridStore,
                    onStyleRow : function (row) {</p>

<pre><code>                    if (row.index === 14) {
                        var color = "color:red;";
                        row.customStyles += color;
                    }
                },
                structure : structure,
                onHeaderCellClick: function(e) {                        
                        if (!dojo.hasClass(e.cell.id, "staticHeader")) {
                            e.grid.setSortIndex(e.cell.index);
                            e.grid.onHeaderClick(e);
                        }                        
                    },
                    onHeaderCellMouseOver: function(e) {
                         if (!dojo.hasClass(e.cell.id, "staticHeader")) {                                                    
                            dojo.addClass(e.cellNode, this.cellOverClass);                            
                        }
                    }
            });
</code></pre>

<p>So how can I eliminate/hide this empty rows ? Any Suggestions?</p>

<p>I'm creating structure like this:</p>

<pre><code>var _gridStyle = 'text-align: center;';
    var _dateColumn = true;
    var _gridStructure = [];
    console.log(params);
    if (params.connectorNames !== "undefined") {

        // setting grid structure
        _gridStructure.push([]);

        for (var i = 0; i &lt; params.connectorNames.length; i++) {
            _gridStructure[0].push({
                name : "test",
                headerClasses : "staticHeader"
            });
        }
        _gridStructure.push([]);

        for (var i = 0; i &lt; metricNames.length; i++) {

            // if data column is required

            if (_dateColumn === true &amp;&amp; i === 0) {
                _gridStructure[1].push({
                    field : "Datum",
                    name : "Datum",
                    width : "5%",
                    styles : _gridStyle
                });
                _dateColumn = false;
                i--;
            } else {

                _gridStructure[1].push({
                    field : metricNames[i],
                    name : metricNames[i].replace("ANZAHL_", ""),
                    styles : _gridStyle,
                });

            }

        }

    }
</code></pre>