1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / does not list my controls

does not list my controls

4 posts, 0 answered
  1. LEIDY JHOANA
    LEIDY JHOANA avatar
    3 posts
    Registered:
    25 Apr 2010
    08 Jul 2010
    Link to this post
    I'm trying to list my controls in the control panel located next to Select a control .... leave all the defaults, but do not leave my controls .. I'm returning a list of my control like this:
     
      public override System.Collections.Generic.IList<Telerik.Web.IToolboxItem> Controls
        {
            get { return new System.Collections.Generic.List<Telerik.Web.IToolboxItem>(
                                                    new Telerik.Web.ToolboxItem[] { new Telerik.Cms.CmsToolboxItem("~/Frontend/Controls/Suscription/AddSuscription.ascx", "Test", "Test", "Test")
                                                    ,new Telerik.Cms.CmsToolboxItem("~Frontend/Controls/WhatIs/WhatIs.ascx", "Test2", "Test2")           
    });   
    }      
    the question is if this list is not whether there are any options you disable the slideshow
    from now thanks                                                   
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    08 Jul 2010
    Link to this post
    Hi LEIDY JHOANA,

    You could take a look at HACK: How to hide controls from toolbox section in Sitefinity 3.6 ( the post is valid for 3.6, 3.7 editions , I do not believe that there would be an issue even using 3.5 edition).

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. LEIDY JHOANA
    LEIDY JHOANA avatar
    3 posts
    Registered:
    25 Apr 2010
    09 Jul 2010
    Link to this post
    good thank you very much for your response ... but maybe I did not understand .... but I've managed to solve the problem, the classes that are created in the App_Code when you go about writing the method 
     public override System.Collections.Generic.IList<Telerik.Web.IToolboxItem> Controls
        {
          Here is a list the controls or return null but should give something back
        }
    App_Code classes must use this method. if at any App_Code class not used generates an exception and not the custom controls load.

    Well I have another problem and I want to create a control but that control is a control container that can be edited from sitefinity occurred to me to put in my control
    <sfWeb:GenericContent ID="GenericContent1" runat="server" >
    /// put here but let me say that does not contain a public property for html tags
     <div id="T-1">
            <div class="subSeccion1"> <img src="contenido/imgContenido1.jpg" alt="Descripcion imagen"    title="Descripcion imagen" /> </div>
            <div class="subSeccion2">
              <h2>Verified by visa</h2>
              <img src="contenido/imgSubseccion4.jpg" alt="Descripcion imagen" width="245" height="160" title="Descripcion imagen" />
              <div class="cuadro1">
                <h3>solicite <br />
                  <strong>corporate</strong></h3>
                <p>Ofrece flexibilidad y la informaci&oacute;n que necesita  para manejar eficientemente los gastos de viaje y entretenimiento de su compa&ntilde;ia.</p>
              </div>
            </div>
    </sfWeb:GenericContent>

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    09 Jul 2010
    Link to this post
    Hello LEIDY JHOANA,

    1. You should not override Controls.

    2. For declaretively added controls you should expose a public property of the same type

    sample ( in the context of a custom control)

    public GenericContent GenericContentControlProps
           {
               get
               {
                   return this.ContentControl;
               }
           }
     
     
       protected virtual GenericContent ContentControl
           {
               get { return base.Container.GetControl<GenericContent>("ContentControl1", true); }
           }


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered