ProtectedSub fv_PreRender(ByVal sender AsObject, ByVal e As System.EventArgs) Handles fv.PreRender If fv.CurrentMode = FormViewMode.Edit Then ' ' drop down controls are not bound to the form, so we must ' do this manually. ' Dim obj As bo_acad_LateralLine _ = CType(fv.DataItem, bo_acad_LateralLine)
If IsNothing(obj) Then ' skip - because there is not object Else
' left right center IfNot IsNothing(CType(fv.FindControl("rblLRC"), RadioButtonList _ ).Items.FindByValue(obj.LRC)) Then
ProtectedSub fv_ItemUpdating(ByVal sender AsObject, ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) Handles fv.ItemUpdating ' ' data column name control name e.NewValues("LRC") = CType(fv.FindControl("rblLRC"), RadioButtonList).SelectedValue EndSub
' you want to do this ' if (document.forms[0].all('" & AssetTypeSelectorRadioButtonList.ClientID & "').options[1].selected) " & vbCrLf ' but what's rendered is individual radio controls. ' so then you want to do this ' if (document.forms[0].all('" & AssetTypeSelectorRadioButtonList.items(1).ClientID & "').selected) " & vbCrLf ' but an item doesn't have a client id Page.RegisterStartupScript("LookupID", str)