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

Hide and showing combo box

1 Answer 202 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 24 Feb 2009, 04:46 AM
hi All

I have implemented a lookup combo box, but it sits within a panel (implemented as a div) which is hidden and shown based on a selection. So when the panel is shown, the containing combo box loses all its functionality. Is there a special trick to reactivate it?

Simon

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Mar 2009, 11:34 AM

Hello Simon,

I tried the scenario and its working fine on my side. Here's the ASPX I tried.

<div id="div1" title="title" visible="false">  
<telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="True"   
        onselectedindexchanged="RadComboBox1_SelectedIndexChanged">  
    <Items> 
        <telerik:RadComboBoxItem runat="server" Text="Index0" Value="Index0" /> 
        <telerik:RadComboBoxItem runat="server" Text="Index1" Value="Index1" /> 
        <telerik:RadComboBoxItem runat="server" Text="Index2" Value="Index2" /> 
    </Items> 
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</telerik:RadComboBox> 
</div> 

JavaScript:
<script type="text/javascript">  
function showhide(sender, args)  
{  
    var div = document.getElementById('div1');   
    if(div.style.display == "none")  
    {  
        div.style.display = "block";  
    }  
    else 
    {  
        div.style.display = "none";  
    }  
</script> 

I also tried using RadComboBox inside panel and found its working fine. Could you paste the code if it is different from this approach?

Thanks,
Princy.
Tags
ComboBox
Asked by
Simon
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or