How do I reference the ID of a EditCommandColumn??
I am trying to make the visable property either true or false based on a condition. exactly like cmdDelete. But there is no ID for the EditCommandColumn.
Thanks in advance
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
Dim chkB As CheckBox = New CheckBox
Dim lblStatus As Label = New Label
chkB = CType(e.Item.FindControl("chkStatus"), CheckBox)
lblStatus = CType(e.Item.FindControl("Status"), Label)
Dim cmdDelete As LinkButton = CType(e.Item.FindControl("cmdDelete"), LinkButton)
If lblStatus.Text = "OPEN" Then
chkB.Checked = False
Else
chkB.Checked = True
chkB.Enabled = False
cmdDelete.Visible = False
End If
End If
I am trying to make the visable property either true or false based on a condition. exactly like cmdDelete. But there is no ID for the EditCommandColumn.
Thanks in advance
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Then
Dim chkB As CheckBox = New CheckBox
Dim lblStatus As Label = New Label
chkB = CType(e.Item.FindControl("chkStatus"), CheckBox)
lblStatus = CType(e.Item.FindControl("Status"), Label)
Dim cmdDelete As LinkButton = CType(e.Item.FindControl("cmdDelete"), LinkButton)
If lblStatus.Text = "OPEN" Then
chkB.Checked = False
Else
chkB.Checked = True
chkB.Enabled = False
cmdDelete.Visible = False
End If
End If