bounding for dropdown list in datagrid

M

Michelle

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top