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

Forums / Developing with Sitefinity / To add one mopre property in cutom module

To add one mopre property in cutom module

3 posts, 0 answered
  1. puneet
    puneet avatar
    14 posts
    Registered:
    12 Mar 2008
    24 Mar 2008
    Link to this post
    I am new  to sitefinty ,,One of my cooleague develop a custom module now i want to add one more property to this module means i placed his control on the page contentplaceholder now when i click on the edit button of this custom control than it shows us some of the property  to set .But i want one more property here how can i include one more property here.

    Like this module shows us all the  value of some column from the database .But i dont want to show all values off this column but i want to show some values so to make filter i want to add one new field in its properties or you can say one more properties the values wriitten in this properties will be used as a filter to get the data from the database...

    Tell me which file i should look at to add one more property in the module edit button

    and where to look for the query which is geting data from the database......... 
  2. Dave
    Dave avatar
    76 posts
    Registered:
    10 Mar 2008
    25 Mar 2008
    Link to this post
    You will need to find the Control's code file first, who's type should either be listed in the Web.config's \telerik\cms\toolboxControls section, or it will be in the Module's code file inside the overridden "IList<IToolboxItem> Controls" method.

    Then adding a new property is as simple as creating a new property in the Control's code file (create a private member with a public get/set accessor):

    private string strNewProperty
    public string NewProperty {
      get { return this.strNewProperty; }
      set { this.strNewProperty = value; }
    }

    It will then show up in the Edit section with the rest of the Control's properties.  You should also be able use that property in your Control's code to do your filtering.  Hope that helps.
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 Mar 2008
    Link to this post
    Hello Dave,


    This is exactly what needs to be done. You just have to add ";" at the end of the first line :)

    Thanks for helping out, Dave. Your Telerik points have been updated.

    Sincerely yours,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
3 posts, 0 answered