Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Capturing the dropdownlist value in a datagrid

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>
0
jm76
Asked:
jm76
1 Solution
 
barretttCommented:
Heres a great article on datagrids with a section on dropdown lists:
http://www.codeguru.com/vb/vb_internet/database/article.php/c6363/
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now