C
champ.supernova
I have a repeater containing dropdownlists. This subroutine is called
when the selected index on one of these dropdownlists is changed...
Public Sub cmbProductType_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs)
Dim cmbProductType As DropDownList = CType(sender,
DropDownList)
Dim objRepeaterItem As RepeaterItem = cmbProductType.Parent
Label1.Text =
Convert.ToString(DataBinder.Eval(objRepeaterItem.DataItem,
"intProductID"))
End Sub
....all I'm trying to do is to simply retrieve the dataitem
"intProductID" from whichever 'row' of the repeater the dropdownlist
belongs to, but have been banging my head against a brick wall up to
now. I thought the syntax I had above would do it, but I just get a
null returned.
The equivalent syntax for an event called relating to the repeater is
'e.Item.DataItem("intProductID")', with e being the
RepeaterItemEventArgs.
I can't find any clear examples anywhere on the Internet either. Has
anyone managed to do anything like this?
when the selected index on one of these dropdownlists is changed...
Public Sub cmbProductType_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs)
Dim cmbProductType As DropDownList = CType(sender,
DropDownList)
Dim objRepeaterItem As RepeaterItem = cmbProductType.Parent
Label1.Text =
Convert.ToString(DataBinder.Eval(objRepeaterItem.DataItem,
"intProductID"))
End Sub
....all I'm trying to do is to simply retrieve the dataitem
"intProductID" from whichever 'row' of the repeater the dropdownlist
belongs to, but have been banging my head against a brick wall up to
now. I thought the syntax I had above would do it, but I just get a
null returned.
The equivalent syntax for an event called relating to the repeater is
'e.Item.DataItem("intProductID")', with e being the
RepeaterItemEventArgs.
I can't find any clear examples anywhere on the Internet either. Has
anyone managed to do anything like this?