make drop down list item unselectable

后端 未结 9 525
天涯浪人
天涯浪人 2020-11-30 07:26

I have a dropdownlist which has several options for generating reports. Based on the type of account the user has certain options which should be visible but not selectable

9条回答
  •  孤城傲影
    2020-11-30 08:09

    You could try this

    myDropDownList.Items.FindByValue("ReportValue").Attributes.Add("disabled", "disabled");
    

提交回复
热议问题