bounding for dropdown list in datagrid

Discussion in 'ASP .Net Datagrid Control' 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. Advertising

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:
    437
    [ MVP ] Sukesh Ashok Kumar
    Jul 12, 2003
  2. Replies:
    7
    Views:
    413
    Thomas Matthews
    May 23, 2005
  3. Replies:
    12
    Views:
    650
  4. =?utf-8?B?5YiY5piK?=
    Replies:
    5
    Views:
    351
    Kai-Uwe Bux
    Aug 13, 2007
  5. Michelle

    bounding for dropdown list in datagrid

    Michelle, Jul 7, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    127
    Michelle
    Jul 7, 2003
Loading...

Share This Page