Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a table EMP_TAB with columns as NAME, ADDRESS, CITY, PHONE.
I want something like this:

I have bound a gridview with the datasource of above table, EMP_TAB
When I click on EDIT in gridview than instead of a textbox, I want a dropdownlist to be displayed for changing the CITY.
The content for that dropdownlist for CITY should be obtained from EMP_TAB

Please, if anybody can shed some light on this.

:)
Thanks
Priyank
Posted
Updated 22-Nov-10 19:57pm
v2

1 solution

Hi
You should use

XML
<EditTemplate>
      <asp:DropDownList runat="server" id="drpCity"></asp:DropDownList>
</EditTemplate>



Refer following link:
GridView Examples for ASP.NET 2.0: Editing the Underlying Data in a GridView[^]


Please do let me know, if you have any doubt.

Please provide "Vote":thumbsup: if this would be helpful, and make "Accept Answer" if this would be correct answer.:rose:

Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900