How to set columns titles row size in GridView

Trying the set the size of the columns titles row to the size as the other rows

enter image description here

               <div style="width:1000px; height:350px; overflow:scroll;">
                   <asp:GridView ID="GridBox1" runat="server" Font-Bold="True" Font-Names="Comic Sans MS" Height="350px" Width="980px" OnSelectedIndexChanged="GridBox1_SelectedIndexChanged">
                       <Columns>
                          <asp:CommandField SelectText="Select" ShowSelectButton="True" />
                       </Columns>
                       <rowstyle Height="35px" />
                       <alternatingrowstyle  Height="35px"/>
                       <SelectedRowStyle BackColor="#CCCCFF" />
                   </asp:GridView>
               </div>

Solution 1:

You are right. The GridView is set to be 350px high.

Normally your grid would then evenly distribute the cell heights of each row. But because you set 35px height on your datarows, the ‘rest pixels’ are used in the headerrow.

If you want the headerrow to be also 35px, you should add:

<HeaderStyle height=“35px” />