Gridview (DetailView, et al) template field disable

  • Thread starter Thread starter Plissskin
  • Start date Start date
P

Plissskin

I would like to put radio buttons (check boxes, drop down lists) in an
ItemTemplate field and have them disabled so the user is not
confused. However, I do not like simply disabling the controls since
this uses the standard Windows disable and "grays" everything out,
rendering them fairly unreadable. Has anyone found a workaround that
mimicks the old VB 6.0 "Locked" behavior that disallows any use of the
controls but leaves them in "enabled" look (colors,etc)? I think this
is something MS should consider for these .net controls in the
future...
 
Howdy,

First of all it does not depend on Microsoft as all ASP.NET controls render
HTML and are parsed by the browser. Unfortunatelly, web srever control is
build from span so ypu cvan't use Readonly expando, but you could use HTML
server control:

<input runat="server" id="whatever" readOnly="readOnly" type="radio"
checked="true" />

hope it helps
 
Back
Top