Note that there are some explanatory texts on larger screens.

plurals
  1. POGridview Header customizing issue
    text
    copied!<p>If we add a customer header to the <code>gridview</code>, will it add extra row?</p> <p>Currently I have a <code>gridview</code> with <code>four</code> columns and, when I add a custom header <code>gridview</code> coming with a <code>five</code> rows.</p> <p>My code looks like this...</p> <pre><code>&lt;asp:TemplateField HeaderText="" ItemStyle-Width="4%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"&gt; &lt;HeaderTemplate&gt; &lt;asp:DropDownList ID="Select" runat="server"&gt; &lt;asp:ListItem&gt;Country&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Region&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Title&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;/HeaderTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText="" ItemStyle-Width="4%" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"&gt; &lt;ItemTemplate&gt; &lt;asp:HiddenField ID="Id" Value='&lt;%#Eval("id")%&gt;' runat="server" /&gt; &lt;asp:Literal ID="ltrImage" runat="server"&gt;&lt;/asp:Literal&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; </code></pre> <p>and three other <code>TemplateFields</code>...</p> <p>Is there any problem of adding header this way? Any other way to add customer header without having this issue? My desired output should look like this</p> <pre><code>Search Result Search By (Dropdownlist) Data column1 Data column2 Data column3 Data column4 </code></pre> <p>The one I am getting now is</p> <pre><code>Sort By (Dropdownlist) Data column1 Data column2 Data column3 Data column4 </code></pre> <p>Could anyone help if have an idea? Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload