ComboBox's initial apperance not pleasing when disabled.

9 posts, 1 answers
  1. SSirica
    SSirica avatar
    50 posts
    Member since:
    Jan 2007

    Posted 22 Dec 2008 Link to this post

    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> 
     
     
  2. Answer
    Helen
    Admin
    Helen avatar
    1052 posts

    Posted 23 Dec 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SSirica
    SSirica avatar
    50 posts
    Member since:
    Jan 2007

    Posted 23 Dec 2008 Link to this post

    Worked like a charm...Thank you much!
  5. Ron
    Ron  avatar
    16 posts
    Member since:
    Aug 2008

    Posted 27 Mar 2009 Link to this post

    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 

     

  6. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 30 Mar 2009 Link to this post

    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.
  7. Ron
    Ron  avatar
    16 posts
    Member since:
    Aug 2008

    Posted 31 Mar 2009 Link to this post

    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

  8. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 31 Mar 2009 Link to this post

    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.
  9. Ron
    Ron  avatar
    16 posts
    Member since:
    Aug 2008

    Posted 10 Apr 2009 Link to this post

    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

  10. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 13 Apr 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017