Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > troubles with dropdownlist inside of datagrid

Thread Tools

troubles with dropdownlist inside of datagrid
Posts: n/a

I'm still relatively new to and i'm having troubles with a
dropdownlist in a datagrid. Here is the code for the dropdownlist

<aspropDownList Runat="server"
OnSelectedIndexChanged="ddlSelectionChanged" SelectedValue='<%#
DataBinder.Eval(Container.DataItem, "ACTIVE")%>' ID="DropDown"
<asp:ListItem Value="1">Enabled</asp:ListItem>
<asp:ListItem Value="0">Disabled</asp:ListItem>
<asp:ListItem Value="2">Deleted</asp:ListItem>

This renders fine, and the proper index is selected when the page comes
up, the difficulty i'm having is capturing the row's unique id field to
update the database when they select a new index and fire the

Here is the codebehind code for the ddlSelectionChanged event

Protected Sub ddlSelectionChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DropDown.SelectedIndexChanged
Dim ddl As DropDownList
ddl = CType(sender, DropDownList)
Dim user_id as integer = (??? this is where i can't figure out
how to get the row id)
End Sub

The event does fire, I made sure of that by using a label and wrote
something to the label at the end of the event.

Any help here would be greatly appreciated as I am about ready to pull
my hair out!

Jeff T.

Reply With Quote
Posts: n/a
nevermind, found the answer on this post

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DropDownList inside GridView: How to set SelectedIndex for the DropDownList? keithb ASP .Net 1 11-01-2006 05:24 AM
problem with dropdownlist inside of datagrid ASP .Net 2 06-06-2005 07:16 PM
Losing one row of datagrid when changing dropdownlist inside it. Luis Esteban Valencia ASP .Net 0 03-23-2005 05:04 PM
setting the default item on a dropdownlist inside a datagrid =?Utf-8?B?QXVkcmV5?= ASP .Net 2 02-06-2004 04:41 AM
Catching an SelectedIndexChanged event from a DropDownList inside a DataGrid Dominic ASP .Net 2 07-04-2003 04:43 AM