hi i need to implement the following rule as validate that there is an active checkbox least in the gridview
and you can not disable
and if there is an active checkbox minimum (1 true) in the gridview can activate others that are inactive (0 false)
sorry for my english :)
select COUNT(*) enabled from checkbox where checkbox.Enabled = 1
Dim total As New checkboxdal
Dim totalcheckboxActive = total.totalCheckboxEnabled(UC)
If totalcheckboxActive > 1 Then
dt.Enabled = chkActive.Checked
Dim Data = ad.updateAspects(UC, dt)
SetResult(String.Format("update '{0}' successful", dt.Enabled ))
Else
Response.Write("<script>alert('You must have at least one checkbox active.');</script>")
End If
End If
Aucun commentaire:
Enregistrer un commentaire