We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Capturing the dropdownlist value in a datagrid

jm76
jm76 asked
on
Medium Priority
231 Views
Last Modified: 2010-04-17
Hi,

I have a dropdownlist with 2 buttons (search, update).  When the update is clicked, I want to get the value or text in the dropdownlist and add it to a db.

I'm using a normal click event for the update button, b/c of how I want the search/update buttons to display in grid.  Can someone help?  Maybe provide a snippet of code as an example?

Here is the edit template part of the grid................

<EditItemTemplate>

<TABLE Width="100%" CellPadding="0" CellSpacing="0" Border="0" >

<TR>


<TD>


<asp:DropDownList id="ddlRC" runat="server" Width="115px" >

<asp:ListItem>Jodi MacLeod</asp:ListItem>

<asp:ListItem>Cyrus Hopkins</asp:ListItem>

<asp:ListItem>Andrew Karson</asp:ListItem>

<asp:ListItem>Brit Nicholson</asp:ListItem>

<asp:ListItem>Ishir Bhan</asp:ListItem>

<asp:ListItem>Robert Kraft</asp:ListItem>

</asp:DropDownList>


</TD>

</TR>

<TR>

<TD>

<asp:button

id="bSearch"

runat="Server"

text="Search"/>

<asp:button

id="bUpdate"

runat="Server"

OnClick="bUpdate_Click"/>

</TD>


</TR>

</TABLE>

</EditItemTemplate>
Comment
Watch Question

Commented:
Heres a great article on datagrids with a section on dropdown lists:
http://www.codeguru.com/vb/vb_internet/database/article.php/c6363/

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.