D
Dgreer
I am trying to hide some textboxes, dropdownlists and labels in
datalist.
I have some textboxes, dropdownlists and labels in a table in a
datalist how do I hide them after they're bound?
Here is some of my code in the datalist.ItemDataBound Event.
Select Case editvisiblity
Case 1
Dim txt As New TextBox
txt = CType(e.Item.FindControl("etxtPK_User_ID"),
TextBox)
txt.Visible = False
e.Item.FindControl("etxtLastLogin").Visible = False
e.Item.FindControl("etxtCreatedBy").Visible = False
e.Item.FindControl("etxtCreationDate").Visible =
False
e.Item.FindControl("ddlRole").Visible = False
e.Item.FindControl("etxtLocID").Visible = False
e.Item.FindControl("ddlUserLevel").Visible = False
e.Item.FindControl("echkActive").Visible = False
e.Item.FindControl("etxtConfirmPassword").Visible =
False
e.Item.FindControl("etxtPassword").Visible = False
e.Item.FindControl("etxtCofilter").Visible = False
e.Item.FindControl("txtPK_User_ID").Visible = False
e.Item.FindControl("txtLastLogin").Visible = False
e.Item.FindControl("txtCreatedBy").Visible = False
e.Item.FindControl("txtCreationDate").Visible =
False
e.Item.FindControl("ddlRole").Visible = False
e.Item.FindControl("txtLocID").Visible = False
e.Item.FindControl("txtPassword").Visible = False
e.Item.FindControl("ddlUserLevel").Visible = False
e.Item.FindControl("chkActive").Visible = False
e.Item.FindControl("txtConfirmPassword").Visible =
False
e.Item.FindControl("txtCofilter").Visible = False
Case 2
e.Item.FindControl("txtCreatedBy").Visible = False
e.Item.FindControl("txtCreationDate").Visible =
False
e.Item.FindControl("txtLocID").Visible = False
e.Item.FindControl("etxtCreatedBy").Visible = False
e.Item.FindControl("etxtCreationDate").Visible =
False
e.Item.FindControl("etxtLocID").Visible = False
End Select
End If
datalist.
I have some textboxes, dropdownlists and labels in a table in a
datalist how do I hide them after they're bound?
Here is some of my code in the datalist.ItemDataBound Event.
Select Case editvisiblity
Case 1
Dim txt As New TextBox
txt = CType(e.Item.FindControl("etxtPK_User_ID"),
TextBox)
txt.Visible = False
e.Item.FindControl("etxtLastLogin").Visible = False
e.Item.FindControl("etxtCreatedBy").Visible = False
e.Item.FindControl("etxtCreationDate").Visible =
False
e.Item.FindControl("ddlRole").Visible = False
e.Item.FindControl("etxtLocID").Visible = False
e.Item.FindControl("ddlUserLevel").Visible = False
e.Item.FindControl("echkActive").Visible = False
e.Item.FindControl("etxtConfirmPassword").Visible =
False
e.Item.FindControl("etxtPassword").Visible = False
e.Item.FindControl("etxtCofilter").Visible = False
e.Item.FindControl("txtPK_User_ID").Visible = False
e.Item.FindControl("txtLastLogin").Visible = False
e.Item.FindControl("txtCreatedBy").Visible = False
e.Item.FindControl("txtCreationDate").Visible =
False
e.Item.FindControl("ddlRole").Visible = False
e.Item.FindControl("txtLocID").Visible = False
e.Item.FindControl("txtPassword").Visible = False
e.Item.FindControl("ddlUserLevel").Visible = False
e.Item.FindControl("chkActive").Visible = False
e.Item.FindControl("txtConfirmPassword").Visible =
False
e.Item.FindControl("txtCofilter").Visible = False
Case 2
e.Item.FindControl("txtCreatedBy").Visible = False
e.Item.FindControl("txtCreationDate").Visible =
False
e.Item.FindControl("txtLocID").Visible = False
e.Item.FindControl("etxtCreatedBy").Visible = False
e.Item.FindControl("etxtCreationDate").Visible =
False
e.Item.FindControl("etxtLocID").Visible = False
End Select
End If