我想为删除索引设置动画。我可以为复选框的点击设置动画,但是当我尝试删除它时,它会消失而没有动画。
Inherits System.Web.UI.Page
'* * * This line comes from C# -> VB converter. But gives the error 'is already declared' * * *
'Protected parentRepeater As System.Web.UI.WebControls.Repeater
Private Sub repeater_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim conn As New MySqlConnection
Dim sql As String
conn.ConnectionString = ConnStr
If Not IsPostBack Then
sql = "SELECT cw_sales.cl_id, cl_name FROM cw_sales"
sql += " INNER JOIN cw_clients ON cw_sales.cl_id = cw_clients.cl_id"
sql += " WHERE og_id=" & 1
sql += " GROUP BY cw_sales.cl_id;"
Dim cmd1 As MySqlDataAdapter = New MySqlDataAdapter(Sql, conn)
Dim ds As DataSet = New DataSet()
cmd1.Fill(ds, "Clients")
sql = "SELECT cw_sales.id, cw_sales.cl_id, cw_sales.art_id, art_desc, art_price1 AS art_price, tab_id, aantal FROM cw_sales"
sql += " INNER JOIN article ON cw_sales.art_id = article.art_id"
sql += " WHERE order_send=0;"
Dim cmd2 As MySqlDataAdapter = New MySqlDataAdapter(sql, conn)
cmd2.Fill(ds, "Orders")
ds.Relations.Add("myrelation", ds.Tables("Clients").Columns("cl_id"), ds.Tables("Orders").Columns("cl_id"))
parentRepeater.DataSource = ds.Tables("Clients")
Page.DataBind()
conn.Close()
Else
End If
End Sub
Public Sub but_Send_Click(sender As Object, e As EventArgs) Handles but_Send.Click
For Each ri As RepeaterItem In parentRepeater.Items
If ri.ItemType = ListItemType.Item OrElse ri.ItemType = ListItemType.AlternatingItem Then
' * * * Error showed on underlying line "Unable to cast object of type 'System.Web.UI.WebControls.Repeater' to type 'repeater'." * * *
Dim rptChildMenu As repeater = DirectCast(ri.FindControl("childRepeater"), repeater)
If rptChildMenu IsNot Nothing Then
'* * * THis block works when there Is only ONE repeater * * *
Dim a As New ArrayList
For Each i As RepeaterItem In rptChildMenu.Items
Dim cb As CheckBox = CType(i.FindControl("chk"), CheckBox)
If cb.Checked Then
Dim hiddenEmail As HiddenField = CType(i.FindControl("hiddenEmail"), HiddenField)
a.Add(hiddenEmail.Value)
End If
Next
'* * * End block
End If
End If
Next
End Sub
}