Infor CRM (formerly Saleslogix) Web Client- Disabling a ComboBox at run time

The ComboBox control on a quickform renders as an ASP.Net Listbox control.  If you want to set the control to disabled, you would think adding a code behind of:

control.Enabled=false;

Would disable the control. Well you would be wrong.  This is due to a change in the ASP.Net v4 runtimes, as described here.  Instead what you need to do is add a different line of code:

control.Attributes.Add(“disabled”, “disabled”);

To re-enable the control in code, you can then call the opposite:

control.Attributes.Remove(“disabled”); 

 

ABOUT THE AUTHOR

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!