More in this section

Forums / Developing with Sitefinity / Using a ItemSelector in a ControlDesigner

Using a ItemSelector in a ControlDesigner

3 posts, 1 answered
  1. Lucas
    Lucas avatar
    65 posts
    Registered:
    22 Mar 2010
    02 Jun 2010
    Link to this post
    Hi,
     
    First of all a small remark: it looks like some properties of ItemSelector are not commented in the documentation, these are probably the properties I'm supposed to use here :)

    In order to make a page selection simpler (the control is an image with an optional hyperlink), I wanted to use an ItemSelector in a ControlDesigner:

    <asp:TextBox ID="txtNavigateUrl" Width="300px" runat="server" />
    <sfLib:ItemSelector ID="ItemSelector" AssignedControl="txtNavigateUrl" runat="server" ShowMode="All"/>

    However, I have 2 issues with this snipper:
    * Firstly, the control has its own "I'm done" button that conflicts with the Designer's button.
    * Secondly, it doesn't seem to write in txtNavigateUrl when an item is selected. I saw there is "Value" property, but I can't find any event to bind to.

    Any pointers? Thanks a lot for your help!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    02 Jun 2010
    Link to this post
    Hi Lucas,

    You have to use ButtonSelector which has "select" button. The button will open a new RadWindow and there will not be a conflict between the dialogs. The second issue will be fixed as well

    <%@ Register TagPrefix="sfLib" Namespace="Telerik.Libraries.WebControls" Assembly="Telerik.Libraries" %>
     
    <asp:TextBox ID="txtNavigateUrl" Width="300px" runat="server" />
    <sfLib:ButtonSelector ID="ButtonSelector1" AssociatedControls="txtNavigateUrl"  runat="server" ButtonText="SELECT" />


    Greetings,
    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.
    Answered
  3. Lucas
    Lucas avatar
    65 posts
    Registered:
    22 Mar 2010
    03 Jun 2010
    Link to this post
    Thanks a lot Ivan!

    For future reference, the appropriate template is
    <asp:TextBox ID="txtNavigateUrl" Width="300px" runat="server" />
    <sfLib:ButtonSelector  ID="ButtonSelectorNavigate"  AssociatedControls="txtNavigateUrl"  runat="server"  ButtonText="Select page" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/PagesSelector.aspx" />
Register for webinar
3 posts, 1 answered