Problem with enabling radcombo

10 posts, 0 answers
  1. laila
    laila avatar
    19 posts
    Member since:
    Nov 2006

    Posted 24 Apr 2009 Link to this post

    Hi,


    I m using RadCombo . Using javascript i m enabling and disabling the radcombo. But i have a problem when i enable the radcombo only combo will be enabled but items will be disabled. Can anybody please give me the solution for this problem. I want all the items of the radcombo is to be enabled when the radcombo is enabled .

    My sample code is as below where chkSpecClassOne, chkEntireClassOne are checkbox control. I have called this code in check event of chkSpecClassOne checkbox .

      function focusSpecClassOne()
           {
             var comboSpec = $find("<%= radcmbDrugsOne.ClientID %>");
                var chkSpOne=document.getElementById("chkSpecClassOne").checked;
              if(chkSpOne)
              {
                 comboSpec.enable();
              var comboItem = comboSpec.get_selectedItem();
              if(comboItem && !comboItem.get_enabled())
              {
                combo.commitChanges();
                comboItem.enable();          
                combo.trackChanges();
              }

                document.getElementById ("chkEntireClassOne").checked=false; 
              
                       }
              else
              {
               comboSpec.disable(); 
                document.getElementById ("chkEntireClassOne").checked=true; 
              
              }
           }

  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 24 Apr 2009 Link to this post

    Hi laila,

    I could not reproduce the problem in a simple page:

    <telerik:RadComboBox ID="RadComboBox1" runat="server" 
    <Items> 
        <telerik:RadComboBoxItem Text="item 1" /> 
        <telerik:RadComboBoxItem Text="item 2" /> 
        <telerik:RadComboBoxItem Text="item 3" /> 
    </Items> 
    </telerik:RadComboBox> 

    <script type="text/javascript">    
    function toggle()  
    {  
        var combo = $find("<%= RadComboBox1.ClientID %>");  
        if (combo.get_enabled())  
            combo.disable()  
        else 
            combo.enable();  
    }  
    </script> 


    Best wishes, Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. laila
    laila avatar
    19 posts
    Member since:
    Nov 2006

    Posted 25 Apr 2009 Link to this post

    Hi,
    Actually my question is consider the following the radcombo

    <telerik:RadComboBox ID="RadComboBox1" runat="server"
    <Items>
        <telerik:RadComboBoxItem Text="item 1" />
        <telerik:RadComboBoxItem Text="item 2" />
        <telerik:RadComboBoxItem Text="item 3" />
    </Items>
    </telerik:RadComboBox>

    assume that RadComboBox1 is disabled(in page_load). Now i m enabling RadComboBox in client side.Then RadComboBox1 is enabled  but items inside the RadComboBox1(in the above example item 1,item 2,item 3 ) will be disabled only . Can u tell me the solution for the same.

    Thanks in advance,
    Laila
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 28 Apr 2009 Link to this post

    Hello laila,

    Again, I could not reproduce the problem. Here is my complete page:

    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
             
    <telerik:RadComboBox ID="RadComboBox1" runat="server" Enabled="false"
    <Items> 
        <telerik:RadComboBoxItem Text="item 1" /> 
        <telerik:RadComboBoxItem Text="item 2" /> 
        <telerik:RadComboBoxItem Text="item 3" /> 
    </Items> 
    </telerik:RadComboBox>  
     
    <input type="button" value="enable" onclick="enableCombo()" /> 
    <script type="text/javascript"
        function enableCombo() { 
            $find("<%= RadComboBox1.ClientID %>").enable(); 
        } 
    </script> 

    When I click on the button - the combo is enabled and all its items are enabled as well.

    Greetings,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Jan Manzer
    Jan Manzer avatar
    1 posts
    Member since:
    Sep 2009

    Posted 11 Sep 2009 Link to this post

    I had the same problem, I'll be trying out the solutions posted.

    Best Regards,
    Jan Manzer
    Jan Manzer


  6. Paul Finn
    Paul  Finn avatar
    1 posts
    Member since:
    Oct 2009

    Posted 13 Oct 2009 Link to this post

    Hello first of all I just would like to thank the thread starter for starting this nice thread. I would say nice because I'm having the same problem as your.What I did I just followed the admin script and the items have been enable.


    Paul Finn
    Strandkorb
  7. iane etnamas
    iane etnamas avatar
    1 posts
    Member since:
    Oct 2009

    Posted 15 Oct 2009 Link to this post

    I am really interested if there's anyone who had solved this problem, for which this would be a great help for anyone who have this kind of problem and so with me who have been with the same situation in finding solutions for this problem. Hope this would be given an immediate solution.Thanks in advance!

    Best regards,
    iane
    http://flexeasy.net/
  8. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 16 Oct 2009 Link to this post

    Hello iane etnamas,

    Please let us know how exactly to reproduce the problem and we will do our best to find a solution. Currently, we are unable to reproduce it.

    Regards,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. bhallu bhallu
    bhallu bhallu avatar
    1 posts
    Member since:
    Oct 2009

    Posted 31 Oct 2009 Link to this post

    Hey frndz..I m using RadCombo . Using javascript i m enabling and disabling the radcombo. But i have a problem when i enable the radcombo only combo will be enabled but items will be disabled. Can anybody please give me the solution for this problem. I want all the items of the radcombo is to be enabled when the radcombo is enabled .thnx.. u can post me here..


    --------------------
    http://www.bibleknowledgebookstore.com/christmas/greeting-cards.html
  10. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 03 Nov 2009 Link to this post

    Hi bhallu bhallu,

    Can you please provide exact instructions for reproducing the issue or some sample code?

    I tried by disabling and enabling the ComboBox on the client-side only and first disabling it on the server-side and then enabling it on the client-side without success in both.

    Best wishes,
    Simon
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top