Drop Down List In A Gridview

Posted by Or Betzalel on Stack Overflow See other posts from Stack Overflow or by Or Betzalel
Published on 2011-01-05T21:10:23Z Indexed on 2011/01/05 22:54 UTC
Read the original article Hit count: 218

I have a gridview, inside the gridview I have a template field and inside that, a drop down list.

        <asp:TemplateField>
            <ItemTemplate>
                <asp:DropDownList ID="Hello" runat="server">
                </asp:DropDownList>
            </ItemTemplate>
        </asp:TemplateField>

I want to databind the gridview but how do I make the drop down list change its value to according to the information I gave it while databinding?

Im used to using DataField in bound fields

         <asp:BoundField HeaderText="Hello" DataField="HelloDB" />

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET