Note that there are some explanatory texts on larger screens.

plurals
  1. POdropdownlist in a footer of gridview
    primarykey
    data
    text
    <p>I have asp grid view and i created 4 columns(Id,Name,quantity,price) and a footer. i have bounded all the 4 columns from the database. in the footer template, i added a dropdown list item. every thing is working fine but, the problem is in the footer templalte dropdownlist is added after all the 4 columns but i want to add the dropdown footer to the 2nd column(Name).</p> <p>Please apologise for my english n Help me</p> <p>I used the following code:</p> <pre><code>&lt;asp:GridView ID="gv_page2" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical" ShowFooter="True"&gt; &lt;AlternatingRowStyle BackColor="#CCCCCC" /&gt; &lt;FooterStyle BackColor="Black" /&gt; &lt;HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" /&gt; &lt;PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /&gt; &lt;SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" /&gt; &lt;SortedAscendingCellStyle BackColor="#F1F1F1" /&gt; &lt;SortedAscendingHeaderStyle BackColor="#808080" /&gt; &lt;SortedDescendingCellStyle BackColor="#CAC9C9" /&gt; &lt;SortedDescendingHeaderStyle BackColor="#383838" /&gt; &lt;Columns&gt; &lt;asp:BoundField DataField="PRO_ID" HeaderText="PRO_ID" /&gt; &lt;asp:BoundField DataField="NAME" HeaderText="NAME" ItemStyle-Width="100px"/&gt; &lt;asp:TemplateField HeaderText="Quantity"&gt; &lt;ItemTemplate&gt; &lt;asp:TextBox runat="server" Width="100px"&gt;&lt;/asp:TextBox&gt;&lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:BoundField HeaderText="PRICE" ItemStyle-Width="80px"/&gt; &lt;asp:BoundField HeaderText="TOTAL_PRICE"/&gt; &lt;asp:TemplateField&gt; &lt;FooterTempenter code herelate &gt; &lt;asp:DropDownList ID="ftrDDL" runat="server" DataTextField="PRO_ID" AppendDataBoundItems="true" DataSourceID="" Width="130px" EnableViewState="true" &gt; &lt;asp:ListItem Text="SELECT ONE" Value=""&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;/FooterTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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