Reputation: 61
I'm trying to do a DropDownList in one cell of the gridview but I only can add columns.
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" DataValueField="Catalog" DataSourceID="SqlDataSource1"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
How can I add an only dropdownlist to a gridview?
Upvotes: 0
Views: 4452
Reputation: 61
I found a solution in asp.net forum, here let you the link if somebody need it: Add DropDownList to a gridview cell
Upvotes: 0
Reputation: 2558
To add DropDownList to GridView cell you should use ItemTemplates. You can find more details Here
Also another sample is here
Upvotes: 1