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

ComboBox's initial apperance not pleasing when disabled.

8 Answers 69 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
SSirica asked on 22 Dec 2008, 03:51 PM
I have a situation where I'd like certain controls disabled when the form 1st comes up.  The RadComboBox is coming up looking like crap.  I've included a link to a picture of what I'm talking about: Example 

I'm using the 2.8.7.0 version along with the included Vista skin.  The code to generate the 2 ComboBoxes in the picture are as following:

 

<radC:RadComboBox ID="ddlSecState" runat="server" SkinsPath="~/RadControls/ComboBox/Skins" Skin="Vista" 
    Height="200px" DropDownWidth="200px" HighlightTemplatedItems="True" Width="50px"   
    DataSourceID="sdsSecState" DataTextField="state_code" DataValueField="state_code" 
    MarkFirstMatch="True" EnableTheming="True" Enabled="false">                                                      
    <ItemTemplate> 
        <table style="width: 190px; text-align: left">  
            <tr> 
                <td style="width: 25px;">  
                    <%#DataBinder.Eval(Container.DataItem, "state_code")%> 
                </td> 
                <td style="width: 170px;">  
                    <%#DataBinder.Eval(Container.DataItem, "state_descr")%> 
                </td> 
            </tr> 
        </table> 
    </ItemTemplate> 
</radC:RadComboBox> 
 
and  
 
<radC:RadComboBox ID="ddlSecCountry" runat="server" SkinsPath="~/RadControls/ComboBox/Skins" Skin="Vista" 
    Height="200px" DropDownWidth="200px" HighlightTemplatedItems="true" Width="200px" 
    AutoPostBack="true" DataSourceID="sdsCountryList" DataTextField="country_name" 
    DataValueField="country_list_id" HideCombo="false" AllowCustomText="false" MarkFirstMatch="true" 
    SelectOnTab="false" ShowDropDownOnTextboxClick="false">  
    <ItemTemplate> 
        <table style="width: 190px; text-align: left">  
            <tr> 
                <td style="width: 100%;">  
                    <%#DataBinder.Eval(Container.DataItem, "country_name")%> 
                </td> 
            </tr> 
        </table> 
    </ItemTemplate> 
</radC:RadComboBox> 
 
 

8 Answers, 1 is accepted

Sort by
0
Accepted
Helen
Telerik team
answered on 23 Dec 2008, 09:23 AM
Hello,

We have been contacted about similar problem before. Could you try to fix it by adding the following javascript code on your page:

<radC:RadComboBox ID="rcbDesks" ...>    
 ...    
</radC:RadComboBox>    
    
<script>    
 var combo =<%=rcbDesks.ClientID%>;     
 combo.FixUp(combo.InputDomElement,true);       
</script>   
 



Regards,
Helen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
answered on 23 Dec 2008, 12:35 PM
Worked like a charm...Thank you much!
0
Ron
Top achievements
Rank 1
answered on 27 Mar 2009, 10:29 AM

Hi,

I have the exact same problem with disabled combo boxes And the provided solution in this forum article  returns the following error:
Microsoft JScript runtime error: Object doesn't support this property or method
on line 

 

combo.FixUp(combo.InputDomElement,

 

true); 

I might missed something. 

Thanks,
Ron 

 

0
Yana
Telerik team
answered on 30 Mar 2009, 06:19 AM
Hello Ron ,

The provided solution is for RadComboBox for ASP.NET, I guess that you're using RadComboBox for ASP.NET AJAX. Is this the case?

Best wishes,
Yana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Ron
Top achievements
Rank 1
answered on 31 Mar 2009, 11:50 AM
Hi Yana,
Yes thats correct Im using the asp.net ajax components.

Is there an alternative solution for this ugly behavior. My customers are not pleased with this at the moment!

Any help is apriciated.
Ron

0
Yana
Telerik team
answered on 31 Mar 2009, 02:22 PM
Hello Ron ,

Please tell us exactly the version of RadControls you're using and paste the definition of the combobox so we to be able to observe the issue. Thanks in advance

Regards,
Yana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Ron
Top achievements
Rank 1
answered on 10 Apr 2009, 10:58 AM
Hi Yana,

First of all sorry for my late response.

Hereby the definition of my combo as requested.

 

 

 

 

<td style="width: 25%">

 

 

 

    <telerik:RadComboBox ID="cmbActiviteitsoort" runat="server" Skin="Office2007" CssClass="OmschrijvingVeld"

 

 

 

        Width="199px" Height="200px" OnSelectedIndexChanged="OphalenFinAfsprakenActiviteitsoort" AutoPostBack="true"

 

 

 

        MarkFirstMatch="True" >

 

 

 

        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

    </telerik:RadComboBox>

 

 

 

</td>

 

 

 

 

 

in my codebehind

 

protected

 

void Page_Load(object sender, EventArgs e)

 

{

 

 

    if (!Page.IsPostBack)

 

    {

 

    

 

        if (Request.QueryString.ToString() != "" && lblNummer.Text != "")

 

        {

 

 

            cmbActiviteitsoort.Enabled =

 

false;

 

        } 
    }

 

 

    ....
    .....
  }    

 

 

 

 

I'm using Version=2008.3.1308.35 (Q3 2008) of the ASPNET Ajax controls.

Hopefully this helps you any further in providing a solution.

Thanks,
Ron

0
Yana
Telerik team
answered on 13 Apr 2009, 02:29 PM
Hello Ron ,

Thank you for sending the definition of RadComboBox.

Unfortunately, I couldn't reproduce the described visual glitch with it. Could you please isolate the problem in a small working example and send it to us. You should open a support ticket to be able to attach files. Thanks 

Best wishes,
Yana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Helen
Telerik team
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
Ron
Top achievements
Rank 1
Yana
Telerik team
Share this question
or