More in this section

Forums / General Discussions / widget - detail in window

widget - detail in window

8 posts, 0 answered
  1. JV
    JV avatar
    74 posts
    Registered:
    15 Jun 2012
    25 Oct 2010
    Link to this post
    Hello,

     Am trying to developer a widget and i need to show the item detail in a Dialog/Window/RadWindow.

    What is the best way to do this fully integrated with sitefinity (design and security) ?

    In the developer guide of Beta 2 exists the method RegisterDialog, can i use it ? How ?

    thanks,
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Oct 2010
    Link to this post
    Hello Joana,

    You can use RadWindow control and inside it call a page or another control where you get the Content property of a Content object - NewsItem, ContentItem, EventsItem etc.

    sample

    var app = App.WorkWith().NewsItems().Get();
    foreach(NewsItem itm in app)
    {
       var cnt = itm.Content;
       Response.Write(cnt);
    }


    Regards,
    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. JV
    JV avatar
    74 posts
    Registered:
    15 Jun 2012
    26 Oct 2010
    Link to this post
    Hi,

    The control that i'm trying to implement has an proper dataprovider.

    I know that i can create a aspx/control and then use RadWindow but in this way i will not be able to fully integrate with sitefinity. for example:

    -  i put my control in one page that is not visible to "Everyone" how to develop the detail Dialog and prevent unauthorized access ?

    - how to call the dialog and this dialog have the same design that the rest of the site?

    I don't know if this is a trivial question because this is may first contact with sitefinity development.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Oct 2010
    Link to this post
    Hello Joana,

    There is a built-in control PromptDialog that you can use. Inside the CustomTemplate you can add a control/s you want to see.

    <sf:ResourceLinks id="resourcesLinks" runat="server" Theme="Default" UseEmbeddedThemes="true">
        <sf:ResourceFile JavaScriptLibrary="JQuery" />
        <sitefinity:ResourceFile Name="Skins/PromptDialog.css" />
    </sf:ResourceLinks>
     
     
    <sitefinity:PromptDialog runat="server" id="promptDialog" Width="150" Height="150" Mode="Custom" AllowCloseButton="true" ShowOnLoad="false" Title="just a test">
        <CustomTemplate>
           <asp:Literal runat="server"  ID="test1"  Text="Hello there" />
        </CustomTemplate>
        <Commands>
            <sf:CommandToolboxItem Text="Done" CommandName="ok" CommandType="CreateButton" WrapperTagName="LI"></sf:CommandToolboxItem>
            <sf:CommandToolboxItem Text="Cancel" CommandName="cancel" CommandType="CancelButton" WrapperTagName="LI"></sf:CommandToolboxItem>
        </Commands>
    </sitefinity:PromptDialog>
     
    <asp:LinkButton runat="server" ID="testbutton" OnClientClick="showPropmpt();return false;"  Text="call function"/>
     
    <script type="text/javascript">
        function showPropmpt() {
            var propmptDialog = $find('<%=promptDialog.ClientID%>');
            propmptDialog.show_prompt();
        }
     
    </script>


    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
  5. JV
    JV avatar
    74 posts
    Registered:
    15 Jun 2012
    26 Oct 2010
    Link to this post
    Hi,

    I don't have the Mode="Custom" i only have the options "Confirm" and "Input".
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Oct 2010
    Link to this post
    Hello Joana,

    It looks like we have implemented the mode after the beta, so you can use this code once we release the RC or use RadWindow control as a dialog to open a cms page on which you can set permissions or a physical file from the project.

    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
  7. John
    John avatar
    97 posts
    Registered:
    11 Jan 2011
    22 Jan 2011
    Link to this post

    Hi Ivan

    Many thanks.

    As I’m new to SF, could you please explain where does this code go? I tried to create custom widget with this code but no luck.

    Many Thanks

    Regards

  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Jan 2011
    Link to this post
    Hello,

    You can create a simple user control and put the logic there.

    Regards,
    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
8 posts, 0 answered