将下拉项目设为只读 [英] make dropdown item as readonly

查看:71
本文介绍了将下拉项目设为只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,

i要求在datagrid中我有一个下拉项目ABC和Others

所以如果我点击其他下拉列表应该是只读的,文本框应该出现。



文本框出现但是下拉列表没有显示为readonly。这可能会使下拉列表成为readonly.please帮助。



谢谢

Srinivasa


i have a requirement that in datagrid i have a drop down with items "A" "B" "C" and "Others"
so if i click on Others dropdown should be readonly and textbox should appear.

textbox is appearing but dropdown is not appearing as readonly .is this possibe to make dropdown as readonly.please help.

Thanks
Srinivasa

推荐答案

你是如何制作文本的?框可见?如果使用javascript然后使用getElementById获取DropDown并通过设置disabled属性禁用它



执行如下操作:



How are you making the text box visible?? If using javascript then use the getElementById to get the DropDown and disable it by setting the disabled attribute

Do it as below:

document.getElementById(''<%= DropDownList1.ClientID %>'').disabled=false;







希望有所帮助:)




Hope it helps :)


这篇关于将下拉项目设为只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆