More in this section

Forums / Developing with Sitefinity / Adding asp:CheckBoxList to a Custom Controls Properties

Adding asp:CheckBoxList to a Custom Controls Properties

2 posts, 0 answered
  1. Scott Harrington
    Scott Harrington avatar
    28 posts
    21 Sep 2009
    28 Oct 2009
    Link to this post
    I've tried several different methods for making this happen and I just cannot quite get it.  I've figured out that I need to add the WebEditor attribute at the top of my class but I really get lost when I try to add the template that contains the two asp:CheckBoxList items.  I am ok with having a read-only textbox on the properties screen that will display a comma delimited list of selected items.  To the right of the textbox a select button would pop a template that the user will be able to select items from the CheckBoxList and once completed the selected items could be built into a string and returned to the Read Only Textbox.  I've seen examples of the read only textbox with the select button that pops a template, but I just haven't been able to tweak them to exactly what I need.  Also the CheckBoxList will be populated with all the Categories within the Sitefinity system.  Could you guys help me from the point where I add Public Properties to my User control, to adding the attributes ('WebEditor') along with any templates I will need including how to get the select button to appear and fire the template.  Then how to get the template to return the selected items back to the User Control.  Thank you so much for your time and help!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    28 Oct 2009
    Link to this post
    Hello Scott Harrington,

    Please take a look at the following blog post. It describes how to create a WebEditor and then return the selected value. In your template you should use CheckBoxList control instead of RadTreeView as done in the sample.

    I hope this helps.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered