Hide radcombobox

2 posts, 0 answers
  1. DEBI
    DEBI avatar
    2 posts
    Member since:
    Jan 2013

    Posted 26 Nov 2013 Link to this post


    I have a web page with several comboboxes , trying to set the enabled property to false on page load with the following code:

      foreach (Telerik.Web.UI.RadComboBox p in this.Controls.OfType<Telerik.Web.UI.RadComboBox>())
                p.Enabled = false;

    doesnt seem to work, can someone suggest the rightway??

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 26 Nov 2013 Link to this post

    Hi DEBI,

    Please have a look into the following code snippet to disable all the RadComboBox in Page_Load event.

    <telerik:RadComboBox ID="RadComboBox1" runat="server">
    <telerik:RadComboBox ID="RadComboBox2" runat="server">

    protected void Page_Load(object sender, EventArgs e)
        foreach (var control in form1.Controls.OfType<RadComboBox>())
            control.Enabled = false;

    Hope this will helps you.
Back to Top