Hide radcombobox

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

    Posted 26 Nov 2013 Link to this post

    Hello,

    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??

    Thanks
  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.

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

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

    Hope this will helps you.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top