bounding for dropdown list in datagrid

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

  2. Try this link and download gridtest.zip from my site for drop down sample
    inside the grid...
    Maybe it helps !
    http://v4cnet.europe.webmatrixhosting.net/

    Rgds
    Sukesh
    Brain Behind - www.v4cnet.com


    "Michelle" <> wrote in message
    news:...
    > 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>
    >
    >
    >
    >
    >
    >
    >
    >
     
    [ MVP ] Sukesh Ashok Kumar, Jul 12, 2003
    #2
    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. Replies:
    7
    Views:
    410
    Thomas Matthews
    May 23, 2005
  2. Replies:
    12
    Views:
    638
  3. =?utf-8?B?5YiY5piK?=
    Replies:
    5
    Views:
    345
    Kai-Uwe Bux
    Aug 13, 2007
  4. Michelle

    bounding for dropdown list in datagrid

    Michelle, Jul 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    122
    Michelle
    Jul 7, 2003
  5. Michelle

    bounding for dropdown list in datagrid

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

Share This Page