在deopdownlist中禁用了一些文本 [英] disabled some text in deopdownlist

查看:109
本文介绍了在deopdownlist中禁用了一些文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i有教育表..



学士 - 硕士学位 - 教育详细信息及其所有教育学位负载来自教育表

但我想分到学士 - 硕士 - 高级学校。



如何禁用此文本..无法在下拉列表中选择



--------学士学位------

广告/营销

建筑

武装部队

艺术

------ master- -------------

商业,计算机/ IT

工程/技术时尚

----- - 学士-----------

财务

美术

家庭科学

---------掌握----------

法律

管理



你能告诉我怎么做吗???



i have a education table..
.
bachelor-master degree - education details and its all education degree load from education table
but i wan to divivde in to bachelor-master-deploma-highschool.
.
how to disable this text..not selectable in dropdownlist
.
--------bachelor-degree------
Advertising/ Marketing
Architecture
Armed Forces
Arts
------master--------------
Commerce,Computers/ IT
Engineering/ TechnologyFashion
------bachelor-----------
Finance
Fine Arts
Home Science
---------master----------
Law
Management
.
can you tell me that how to do this ???

推荐答案

试试这个:



Try this:

ddl.Items[0].Add("--------bachelor-degree------").Attributes.Add("disabled", "true");


这篇关于在deopdownlist中禁用了一些文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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