This is a migrated thread and some comments may be shown as answers.

Problem with enabling radcombo

9 Answers 126 Views
Forum suggestions
This is a migrated thread and some comments may be shown as answers.
laila
Top achievements
Rank 1
laila asked on 24 Apr 2009, 10:53 AM
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; 
          
          }
       }

9 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 24 Apr 2009, 12:47 PM
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.
0
laila
Top achievements
Rank 1
answered on 25 Apr 2009, 02:14 PM
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
0
Veselin Vasilev
Telerik team
answered on 28 Apr 2009, 11:40 AM
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.
0
Jan Manzer
Top achievements
Rank 1
answered on 11 Sep 2009, 11:14 AM
I had the same problem, I'll be trying out the solutions posted.

Best Regards,
Jan Manzer
Jan Manzer


0
Paul Finn
Top achievements
Rank 1
answered on 13 Oct 2009, 10:48 AM
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
0
iane etnamas
Top achievements
Rank 1
answered on 15 Oct 2009, 06:42 AM
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/
0
Veselin Vasilev
Telerik team
answered on 16 Oct 2009, 12:36 PM
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.
0
bhallu bhallu
Top achievements
Rank 1
answered on 31 Oct 2009, 05:19 PM
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
0
Simon
Telerik team
answered on 03 Nov 2009, 12:47 PM
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.
Tags
Forum suggestions
Asked by
laila
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
laila
Top achievements
Rank 1
Jan Manzer
Top achievements
Rank 1
Paul Finn
Top achievements
Rank 1
iane etnamas
Top achievements
Rank 1
bhallu bhallu
Top achievements
Rank 1
Simon
Telerik team
Share this question
or