Removing the focus (dotted line around the checkbox) when...

B

BTHOMASinOHIO

I have a datagrid inwhich I wanted some Roles to be able to change and
postback while others would not see a change. Instead of using the
enabled/disabled, because I didn't like the shading out of the
checkbox, they are kept enabled, but depend on the Role, the Post back
is turned Off/On and an attribute on the Clicked event is added to
keep (or not keep) the box checked.

(MY CODE)
Dim myaccess As String = Session.Item("ProviderLoginId")
If Session.Item("ROLE") = XYZ Then
CheckBoxStatus.AutoPostBack = False
CheckBoxStatus.Attributes.Add
("onClick", CheckBoxStatus.ClientID + ".checked =
!"+CheckBoxStatus.ClientID + ".checked;")
Else
CheckBoxStatus.AutoPostBack = True
End If


This all works great, accept when the checkbox is clicked, the
checkbox gets "focus" with a thin dotted box around it.

How can I turn that attribute off?
What is it called? Focus?

Thanks
 
P

Prasad

Hi

You can also use this :

<input type=chekcbox onfocus="this.blur()">

this will remove focus from the checkbox when focus is given.
HTH
Prasad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top