widget - detail in window

Posted by Community Admin on 03-Aug-2018 17:54

widget - detail in window

All Replies

Posted by Community Admin on 25-Oct-2010 00:00

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,

Posted by Community Admin on 25-Oct-2010 00:00

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

Posted by Community Admin on 26-Oct-2010 00:00

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.

Posted by Community Admin on 26-Oct-2010 00:00

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

Posted by Community Admin on 26-Oct-2010 00:00

Hi,

I don't have the Mode="Custom" i only have the options "Confirm" and "Input".

Posted by Community Admin on 26-Oct-2010 00:00

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

Posted by Community Admin on 22-Jan-2011 00:00

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

Posted by Community Admin on 25-Jan-2011 00:00

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

This thread is closed