bounding for dropdown list in datagrid

Discussion in 'ASP .Net Web Controls' started by Michelle, Jul 7, 2003.

  1. Michelle

    Michelle Guest

    Hello,

    I put a dropdown list in ItemTemplate Column. I can select its value from
    the dropdown list and store in a dataset, but when I retrieve records from
    dataset, it doesn't show up in the datagrid. Is there anything I missed? and
    where can I find something for reference?

    Thanks.

    Here is html code snippets.
    <asp:datagrid id="dgProduct" style="Z-INDEX: 102; LEFT: 5px; POSITION:
    absolute; TOP: 301px" runat="server" AutoGenerateColumns="False"
    DataKeyField="ProductId" Width="100%">
    <Columns>
    <asp:BoundColumn DataField="Name" HeaderText="Product Name">
    <ItemStyle Font-Size="X-Small"></ItemStyle>
    </asp:BoundColumn>
    <asp:TemplateColumn HeaderText="Product Code">
    <ItemTemplate>
    <asp:DropDownList id="ddlCode" runat="server">
    <asp:ListItem></asp:ListItem>
    <asp:ListItem Value="A">A</asp:ListItem>
    <asp:ListItem Value="B">B</asp:ListItem>
    <asp:ListItem Value="C">C</asp:ListItem>
    </asp:DropDownList>
    </ItemTemplate>
    </asp:TemplateColumn>
    </Columns>
    </asp:datagrid>
     
    Michelle, Jul 7, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michelle

    bounding for dropdown list in datagrid

    Michelle, Jul 7, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    523
    [ MVP ] Sukesh Ashok Kumar
    Jul 12, 2003
  2. vishnu
    Replies:
    1
    Views:
    1,449
    Patrick.O.Ige
    Mar 25, 2006
  3. Replies:
    7
    Views:
    602
    Thomas Matthews
    May 23, 2005
  4. Replies:
    12
    Views:
    815
  5. =?utf-8?B?5YiY5piK?=
    Replies:
    5
    Views:
    436
    Kai-Uwe Bux
    Aug 13, 2007
  6. Michelle

    bounding for dropdown list in datagrid

    Michelle, Jul 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    216
    Michelle
    Jul 7, 2003
  7. Daniel Berger
    Replies:
    1
    Views:
    349
    Phrogz
    Sep 2, 2010
  8. PeterOut
    Replies:
    3
    Views:
    279
    Aandi Inston
    Feb 9, 2006
Loading...