Hello,
When I click on several checkboxes to set a variables xx,yy,zz,ww to 1 for rows checked my code below (Msgbox ("Test") never executes, any ideas what is causing this problem?
Code:
Protected Sub Button131_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button131.Click
Dim str1 As String = Nothing
xx = 0
yy = 0
zz = 0
ww = 0
Dim ctrlA As Control = MultiView1.FindControl("C1SDeactivation")
For i = 0 To C1SDeactivation.Items.Count - 1
If C1SDeactivation.Items(i).Selected Then
MsgBox("Test") *****Does not execute
If i = 0 Then
xx = 1
End If
If i = 1 Then
yy = 1
End If
If i = 2 Then
zz = 1
End If
If i = 3 Then
ww = 1
End If
End If
MsgBox(i)
Next
MsgBox(xx)
MsgBox(yy)
MsgBox(zz)
MsgBox(ww)
End Sub
Control:
<cc1:C1ComboBox ID="C1SDeactivation" runat="server"
OpenDropDownOnLoad="True"
SelectionMode="Multiple" Width="180px"
onselectedindexchanged="C1SDeactivationA_SelectedIndexChanged"
OnClientSelectedIndexChanged ="C1SDeactivationA_OnClientSelectedIndexChanged"
AccessKey="" ToolTip="" HideDropDownListOnBlur="False"
DropDownPositioningMode="BottomCenter" DropDownHeight="100"
Text="Select (Multiple Allowed)" ShowTrigger="False" IsEditable="False">
<ItemsTemplate>
<asp:CheckBox ID="SDeactivation" runat="server" onChange="setColor(); " />
<%# DataBinder.Eval(Container.DataItem, "SDeactivation")%>
</ItemsTemplate>
</cc1:C1ComboBox>
Thanks,
Victor
If C1SDeactivation.Items(i).S
never evaluates to true.