Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make dropdown list unselectable?

How can I make the <h:selectOneMenu> dropdown list unselectable?

It is not like using disabled. I just want to make the dropdown list options unselectable and to appear with a different (inactive) style class.

How can I achieve this? By a JSF component attribute or CSS or JavaScript?

like image 497
AKZap Avatar asked Dec 02 '22 00:12

AKZap


1 Answers

<asp:DropDownList ID="ddlName" runat="server" style="pointer-events: none; cursor: default;">
</asp:DropDownList>

Add style attribute to DropDownList as style="pointer-events: none; cursor: default;". This will work succesfully, I have tried this.

like image 72
SanamShaikh Avatar answered Dec 04 '22 09:12

SanamShaikh