Namespaces Telerik.Web.UI and Telerik.Webcontrols both contain RadComboBox

6 posts, 0 answers
  1. Oliver
    Oliver avatar
    3 posts
    Member since:
    May 2008

    Posted 06 May 2008 Link to this post

    Hi

    I'm trying to skin a RadComboBox.

    After trying to copy an example given in another Telerik forum I noticed that the only way to get the skinning to work (at all) was to add a reference to the dll supplied in the example: RadComboBox.Net2.dll

    On further investigation I found that the namespaces Telerik.Web.UI (in assembly Telerik.web.ui.dll - downloaded in the trial version of RadControls for ASP.NET AJAX), and, Telerik.Webcontrols (in assembly RadCombobox.Net2.dll) both contain RadComboBox. Which one should I use? Why are they different? And in which product is RadCombobox.Net2.dll contained? (I cannot find it in any of the available downloads)

    Thanks
  2. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 06 May 2008 Link to this post

    Hi Oliver,

    All our controls now have classic and ajax editions. In other words, RadComboBox.Net2 is the dll of the classic combobox edition, whereas Telerik.Web.UI contains all our controls, including RadComboBox, that represent our latest generation controls built entirely on top of MS Ajax. If you are going to build your application from scratch I would suggest that you use the ajax edition of the combobox (as part of Telerik.Web.UI) as this edition provides lots of improvements. For more details, please refer to the following link:
    What's new in RadControls for ASP.NET Ajax

    Having any other questions, please feel free to ask.

    Regards,
    Nick
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Oliver
    Oliver avatar
    3 posts
    Member since:
    May 2008

    Posted 06 May 2008 Link to this post

    Hi Nick

    Thanks for the quick response.

    I still can't see how to use a custom skin with the latest RadComboBox.

    Can you provide an example using Telerik.Web.UI.dll?

    The setup I have is:

    A custom skin file "Test.skin" containing:

    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
    <telerik:RadComboBox
        Runat="server"
        SkinsPath="~/App_Themes/MyTheme/"
        SkinID="test1"
        Skin="Test"
    >   
    </telerik:RadComboBox>

     in:
    "~/App_Themes/MyTheme/"

    which also contains a sub folder "Test" which contains "Styles.css", which contains for example: .ComboBoxInput_Test {etc...}

    In my ASPX file I have a control:

        <telerik:RadComboBox runat="server" ID="RadComboBox1"         Width="200px"
            MaxLength="200"
            DropDownWidth="300"
            EnableEmbeddedSkins="false"
            SkinID="test1"
            Skin="Test"
        >
        </telerik:RadComboBox>

    And have set the page attribute 'Theme="MyTheme"'

    Currently, this results in no styles whatsoever being applied.

    Guidance would be greatly appreciated.
    Thanks

  5. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 06 May 2008 Link to this post

    Oliver-

    How did you go about building your custom Combobox skin? Did you start with one of the default skins provided in the RadControls for ASP.NET AJAX install directory? If not, that's definitely the path I'd recommend so that you can ensure you get all of the style names correct.

    Otherwise, your setup looks pretty sound. You've correctly set the EnableEmbeddedSkins property to false, you've correctly pointed the SkinsPath, and you've set your page's Theme. For further debugging, you may want to use a tool like FireBug (in Firefox) and see what styles are being applied to the RadCombobox and what stylesheets are being attached to your page. That may help highlight what's not working.

    Hope this helps. Let me know if you have additional questions.

    -Todd
  6. Oliver
    Oliver avatar
    3 posts
    Member since:
    May 2008

    Posted 07 May 2008 Link to this post

    Hi Todd

    Thanks for the response. I started over from scratch and have produced a working example (I'd like to post it up here but there isn't a facility)

    What seems to have been my biggest problem is cacheing and a few hardcoded strings.

    What I did originally was copy one of the telerik themes and construct my own from that (i.e. rename the css classes inside the .css with my own skin name e.g. .ComboBoxImage_Outlook becomes .ComboBoxImage_RadComboBoxTest), and also copy over the folder containing the .gifs etc.

    Then I set up the skin file, aspx page (as described in my previous post), however, on my journey of experimentation, something was set wrong, misnamed or something and something got cached. I really can't be more specific than this as I was trying for hours and could not get it to work and can't remember which routes I took.

    What I have since found (with my small working example - which I can't upload) is the following:

    My environment:
    Developing on IE with IIS.
    Theme directory (set as SkinPath in .skin file): ~/App_Themes/MyTheme/
    Skin name: "RadComboBoxTest"
    Skin Directory: ~/App_Themes/MyTheme/RadComboBoxTest
    Skin .css file name and dir: ~/App_Themes/MyTheme/RadComboBoxTest/ComboBox.RadComboBoxTest.css
    (n.b. this file name is teleriks recommended format but the actual file name is irrelevant - see below)
    Skin graphics dir: ~/App_Themes/MyTheme/RadComboBoxTest/ComboBox
    (n.b the "ComboBox" part must be named this)

    I start from a working example i.e. all parts of the skin are rendered correctly, all steps described are sequential.

    1) rename the .css file (via explorer) = everything breaks. No parts of the skin rendered correctly.
    2) move graphic folder (ComboBox) out of skin directory (anywhere) = control renders partially correctly (i.e. minus graphics)
    3) move graphic folder (moved in 2) back into the skin directory = control renders correctly.
    4) rename "ComboBox" folder to "ComboBox__" = control renders partially correctly (i.e. minus graphics)
    5) rename "ComboBox__" folder to "ComboBox" = control renders correctly.

    This says to me that something is monitoring the directories (but unfortunately not the files!)

    What must of happened was, during my experimentations, and before I got it working, I renamed the css file (probably whilst copying the posted telerik example which uses the "Classic" control set in the Telerik.webcontrols namespace), or renaming it to the recommended {controlname}.{skinname}.css format. This resulted in step 1 above occurring and from which I have been unable to find a solution to that doesn't require reconstructing skin directories.

    Where the cacheing problem, if it is that, lies (Telerik, IIS or .Net) I do not know. But if anyone is having problems this is certainly something to consider. Telerik people - if you want my working example project using your ASP AJAX controls please tell me how I can get it to you.

    Sorry about the long post.
    Oliver









  7. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 07 May 2008 Link to this post

    Oliver-

    Thanks for the complete explanation of your journey. You are indeed correct that there is a naming paradigm you must follow when building your own custom skins for them to work correctly. That's why it's usually easiest to copy the folder for an existing Telerik provided theme in to your App_Theme directory and then modify form there.

    In any event, I'm glad you've got everything working now. If you have any trouble in the future, you know where to find help.

    -Todd
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017