Hi All,
I have a asp:GridView and in there i have two columns , in one column i want to show label but when i click an sdit button i want to show a drop down list in that particular column, i have created the grid view like following:
<bw:GridView ID="grdProducts" AllowPaging="True" PageSize="5" AllowSorting="True"
CssClass="DGTable" runat="server" AutoGenerateColumns="False" DataKeyNames="LinkedProductCode"
RowSelectingEnabled="True" RowStyle-CssClass="DGItem" SelectedRowStyle-CssClass="DGSelectedItem"
FooterStyle-CssClass="DGFooterTR" EditRowStyle-CssClass="DGEditItemValidator" >
<Columns>
<asp:BoundField DataField="LinkedProductCode" HeaderText="Product Code" ReadOnly="true" meta:resourcekey="BoundFieldResource4" />
<asp:TemplateField HeaderText="Product Type" ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<asp:Label ID="lbl1" runat="server" Text='<%# Bind("LinkedProductType")%>' />
</ItemTemplate>
<EditItemTemplate >
<asp:DropDownList ID="linkedproductList" runat="server" DataSourceID="list">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
<SelectedRowStyle CssClass="DGSelectedItem" />
<PagerStyle CssClass="DGPagerTR" />
<HeaderStyle CssClass="DGHeaderTR" />
</bw:GridView>
what should i do to do it? What should i write in edit button's click event? Please help..