Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
112 views

Folks,

Using VS 2010 with RadControls for ASP.NET AJAX Q3 2012. I am using below link as a prototype.

http://demos.telerik.com/aspnet-ajax/editor/examples/edittemplate/defaultcs.aspx

Attached is my Grid and I would like export only the Selected Row Rad Editor content to PDF in i a new window.  below is is my complete radgrid declaration.

Any help is appreciated.

Thanks

gc_0620

______________
<form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
        EnableRoundedCorners="false" />
    <telerik:RadGrid ID="MyDataGrid" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
        AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
        AutoGenerateEditColumn="True" AutoGenerateDeleteColumn="True" CellSpacing="0"
        GridLines="None" AllowFilteringByColumn="True" AllowSorting="True">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView DataKeyNames="ID" CommandItemDisplay="Top">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridTemplateColumn UniqueName="ID" Display="false">
                    <ItemTemplate>
                        <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn UniqueName="Content">
                    <ItemTemplate>
                        <asp:Label ID="lblField1" CssClass="text" runat="server" Text='<%# Eval("Content") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadEditor ID="RadEditorEdit" SkinID="DefaultSetOfTools" ContentFilters="DefaultFilters,PdfExportFilter"
                            runat="server" content='<%# Bind("Content") %>'>
                            <ExportSettings OpenInNewWindow="true">
                            </ExportSettings>
                        </telerik:RadEditor>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <telerik:RadEditor ID="RadEditorEdit" runat="server" SkinID="DefaultSetOfTools" ContentFilters="DefaultFilters,PdfExportFilter"
                            content='<%# Bind("Content") %>'>
                            <ExportSettings OpenInNewWindow="true">
                            </ExportSettings>
                        </telerik:RadEditor>
                    </InsertItemTemplate>
                </telerik:GridTemplateColumn>
 
                <telerik:GridTemplateColumn UniqueName="Export">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" OnClick="Button1_Click" runat="server" Text="PDF Export"></asp:LinkButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                 
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString2 %>"
        SelectCommand="SELECT [ID], [Content] FROM [BlogPosts]" UpdateCommand="UPDATE [BlogPosts] SET [Content] = @Content WHERE [ID] = @ID"
        DeleteCommand="DELETE FROM [BlogPosts] WHERE [ID] = @ID" InsertCommand="INSERT INTO [BlogPosts] ([PublishDate], [Category], [Title], [Content]) VALUES (GETDATE(), 'Foo', 'Bar',@Content)">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Content" Type="String"></asp:Parameter>
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Content" Type="String"></asp:Parameter>
            <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
        </UpdateParameters>
    </asp:SqlDataSource>
    </form>

Rumen
Telerik team
 answered on 26 Oct 2012
4 answers
125 views
Hello,
I'm using FileExplorer with a custom DB content provider, and everything works beautifully with one small exception:  When I add directory items and do a refresh, the new child directories do not appear in the treeview, although they are correctly returned and displayed in the grid.  I have tried all manner of suggestions found in the forums here, but with no satisfaction.  The only thing that gets the new directories to display is a full refresh of the page containing the FileExplorer.  I am using version 2010.1.519.20 of the controls.  Any assistance would be appreciated.

--Derek Snyder
Rohan
Top achievements
Rank 1
 answered on 26 Oct 2012
3 answers
71 views

I have following code. 

1.  What I want to achieve is, to keep updating label2 as program statements proceeds eg.  "Loading,.... ", "Connecting....."
"Applying Changes......"   "Done..".   The Idea is to keep user inform about the current status , when processing takes longer time.

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" >
<asp:Label ID="Label2" runat="server" ForeColor="Red">Loading... </asp:Label>
<asp:Image ID="Image1" runat="server" Width="224px" Height="48px" ImageUrl="~/Loading.gif">
</asp:Image>
</telerik:RadAjaxLoadingPanel>

Following is my code behind.

protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
     {
         Label2.Text = "Connecting to Source";
  .........  Long code to retrieve data from DB into UC datasource.
         RadGrid1.DataSource = uc;
         Label2.Text = "Apply Results.";
     }


But this does not seem to work...... Is there a better workarond ?


-JD

Vasil
Telerik team
 answered on 26 Oct 2012
3 answers
69 views
Hi,

I have use radsplitter in my page .I have three radpane right left and center .Width for left and right is assigned but middle pane adjust its width accordingly.But whenever page load it flicker which is irratating.Please providee solution for this
Vessy
Telerik team
 answered on 26 Oct 2012
2 answers
182 views
I've got a radEditor in a form template of a radGrid editor. I had a problem with the size of the radEditor when it displays the first time, so on the advice of another forum post I added the following to my master page.
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server">
    <StyleSheets>
        <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" />
        <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" />
        <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" />
        <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" />
    </StyleSheets>
</telerik:RadStyleSheetManager>

This worked fine on my desktop at work, but on my laptap I get the following error:
 

Server Error in '/Workforce' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.RadStyleSheetManager.GetIsValidScriptEntry(ScriptEntry scriptEntry) +20 Telerik.Web.UI.RadStyleSheetManager.RegisterValidStyleSheets(IList`1 styleSheets) +112 Telerik.Web.UI.RadStyleSheetManager.Page_PreRenderComplete(Object sender, EventArgs e) +114 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +9010682 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2716 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Work computer is currently on Q2 2012 version and laptop is on Q3 2013. The only other difference I can find is that at work the referenced dlls are in my projects /Bin folder, and at home they are referenced from the GAC. Is there a problem with the StyleSheetManager finding dlls that are in the GAC?
Dimitar Terziev
Telerik team
 answered on 26 Oct 2012
1 answer
174 views
Hi, I've been really struggling with getting a custom skin to work in a test website.

I created a simple skin through the telerik tool and extracted the zip file into my css folder. I added in the common and telerik folders to the same css folder.

When I use a direct link tag in the header

<link href="css/MySkin/Button.MySkin.css" rel="stylesheet" type="text/css" />

With my button:

<telerik:RadButton ID="RadButton1" runat="server" Skin="MySkin" EnableEmbeddedSkins="false"  Text="RadButton" >
</telerik:RadButton>

It works fine and shows up correctly. 

When I attempt to use a RadStyleSheetManager the button shows up but with nothing in the background. No image.

<telerik:RadStyleSheetManager 
ID="RadStyleSheetManager1" runat="server">
            <StyleSheets>
                <telerik:StyleSheetReference IsCommonCss="true" Path="~/css/MySkin/Button.MySkin.css" />
            </StyleSheets>
        </telerik:RadStyleSheetManager>

I set the background in the css to just be a solid color and it shows up. So it looks like it's accessing the css and loading it correctly, but not actually loading the button image sprite. 

<add key="Telerik.Web.UI.StyleSheetFolders" value="~/css/;~/css/Common/;~/css/Telerik/; ~/css/MySkin/; " />

Is in my web.config. 

How can I use the RadStylesheetManager with my custom skin?
Derek
Top achievements
Rank 1
 answered on 26 Oct 2012
2 answers
88 views
Hi, I had a custom skin in my current website and has been working fine for a while. I recently upgraded to the latest telerik asp.net ajax version using the upgrade wizard and it does not seem to be working at all anymore. I've compared the project prior to the update to the new project and I don't notice anything that is missing.

Basically everything looks normal, the buttons, or the skin around the rad window is just invisible. 

I look at the css of the page and I see it referencing it correctly... I'm kind of at a lost. Is there any common problems with this that I should be looking for?

Thanks
Derek
Top achievements
Rank 1
 answered on 26 Oct 2012
1 answer
96 views
I have a RadDock with a TitlebarTemplate with an Update Panel with a LinkButton that takes the user to another .aspx page.
That all works well and renders properly in IE (thanks for the awesome control - love it).
My only issue is that these controls that have the updatepanels with the linkbuttons render wierdly in Chrome.

I have attached screenshots of both.
Following is my code, kindly assist!

.RadDock .rdCenter EM
    {
        font-size:22px;
        vertical-align:top;
    }

<telerik:RadDockLayout runat="server" ID="RadDockLayout1" EnableEmbeddedSkins="false"
        Skin="None">
        <table>
            <tr>
                <td rowspan="2" style="width: 25%; padding-left: 1%; padding-right: 1%; vertical-align: top">
                    <telerik:RadDockZone AllowedDocks="rdProjects" runat="server" ID="RadDockZone1" Orientation="vertical"
                        Style="border: 0; width: 280px">
                        <telerik:RadDock DockMode="Docked" runat="server" ID="rdProjects" Font-Size="20px" EnableDrag="false"
                            Title="Latest Featured Projects" Height="390px" EnableRoundedCorners="true" Skin="WebBlue"
                            DefaultCommands="None" Style="padding-top: 6px">
                            <TitlebarTemplate>
                                <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                                    <ContentTemplate>
                                        <asp:LinkButton runat="server" ID="LinkButton1" ForeColor="White" Text="Latest Featured Projects"
                                            OnClientClick="GoToPage('ProjectListing.aspx');">
                                        </asp:LinkButton>
                                        <br />
                                        <br />
                                        <div id="boats" >
                                            @@$5$1$$@@
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </TitlebarTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
                <td rowspan="2" valign="top" style="width: 25%; height: 17px; padding-left: 1%; padding-right: 1%;">
                    <telerik:RadDockZone AllowedDocks="rdTestimonials" runat="server" ID="RadDockZone2"
                        Orientation="vertical" Style="border: 0; width: 280px">
                        <telerik:RadDock DockMode="Docked" runat="server" ID="rdTestimonials" Font-Size="20px" EnableDrag="false"
                            Title="Testimonials" Height="390px" EnableRoundedCorners="true" Skin="WebBlue"
                            DefaultCommands="None" Style="padding-top: 6px">
                            <TitlebarTemplate>
                                <asp:UpdatePanel runat="server" ID="UpdatePanel2">
                                    <ContentTemplate>
                                        <asp:LinkButton runat="server" ID="LinkButton2" ForeColor="White" Text="Testimonials"
                                            OnClientClick="GoToPage('Testimonials.aspx');">
                                        </asp:LinkButton>
                                        <br />
                                        <br />
                                        <div id="tests" style="color: Black">
                                            @@[[6<div class="testItem" style="width: 99%; padding: 1px; color: Black">
                                                @@#6#@@
                                            </div>
                                            ]]@@</div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </TitlebarTemplate>
                        </telerik:RadDock>
                    </telerik:RadDockZone>
                </td>
                <td style="width: 50%;padding-top:5px">
                    <table >
                        <tr>
                            <td>
                            </td>
                            <td valign="top" style="width: 48%; padding-left: 1%; padding-right: 1%;">
                                <telerik:RadDockZone AllowedDocks="rdStats" runat="server" ID="RadDockZone3" Orientation="vertical"
                                    Style="border: 0; width: 280px">
                                    <telerik:RadDock DockMode="Docked" runat="server" ID="rdStats" Title="Current Stats" EnableDrag="false"
                                        Height="170px" EnableRoundedCorners="true" Skin="WebBlue" DefaultCommands="None">
                                        <ContentTemplate>
                                            <br />
                                            <table class="content">
                                                <tr>
                                                    <td>
                                                        @@#4#@@
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </telerik:RadDock>
                                </telerik:RadDockZone>
                            </td>
                            <td>
                            </td>
                            <td valign="top" style="width: 48%; padding-left: 1%; padding-right: 1%;">
                                <telerik:RadDockZone AllowedDocks="rdDiscounts" runat="server" ID="RadDockZone4"
                                    Orientation="vertical" Style="border: 0; width: 280px">
                                    <telerik:RadDock DockMode="Docked" runat="server" ID="rdDiscounts" Font-Size="20px" EnableDrag="false"
                                        Title="Special Discounts" Height="170px" EnableRoundedCorners="true" Skin="WebBlue"
                                        DefaultCommands="None">
                                        <ContentTemplate>
                                            <br />
                                            <table>
                                                <tr>
                                                    <td>
                                                        <a href="discount.aspx">
                                                            <img src="@@*5*@@" alt="@@?5?@@" /></a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </telerik:RadDock>
                                </telerik:RadDockZone>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="width: 50%;">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                            </td>
                            <td valign="top" style="width: 48%; padding-left: 1%; padding-right: 1%;">
                                <telerik:RadDockZone AllowedDocks="rdNews" runat="server" ID="RadDockZone5" Orientation="vertical"
                                    Style="border: 0; width: 280px">
                                    <telerik:RadDock DockMode="Docked" runat="server" ID="rdNews" Font-Size="20px" Title="News" EnableDrag="false"
                                        EnableRoundedCorners="true" Skin="WebBlue" DefaultCommands="None" Height="200px">
                                        <TitlebarTemplate>
                                            <asp:UpdatePanel runat="server" ID="UpdatePanel4">
                                                <ContentTemplate>
                                                    <asp:LinkButton runat="server" ID="LinkButton4" ForeColor="White" Text="News" OnClientClick="GoToPage('News.aspx');">
                                                    </asp:LinkButton><br /><br />
                                                    <div style="font-size: 12px">
                                                        @@^3^@@
                                                    </div>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                        </TitlebarTemplate>
                                    </telerik:RadDock>
                                </telerik:RadDockZone>
                            </td>
                            <td>
                            </td>
                            <td valign="top" style="width: 48%; padding-left: 1%; padding-right: 1%;">
                                <telerik:RadDockZone AllowedDocks="rdProjects" runat="server" ID="RadDockZone6" Orientation="vertical"
                                    Style="border: 0; width: 280px">
                                    <telerik:RadDock DockMode="Docked" runat="server" ID="RadDock1" Font-Size="20px" EnableDrag="false"
                                        Title="Events" Height="200px" EnableRoundedCorners="true" Skin="WebBlue" DefaultCommands="None">
                                        <TitlebarTemplate>
                                            <asp:UpdatePanel runat="server" ID="UpdatePanel3">
                                                <ContentTemplate>
                                                    <asp:LinkButton runat="server" ID="LinkButton3" ForeColor="White" Text="Events" OnClientClick="GoToPage('Events.aspx');">
                                                    </asp:LinkButton><br /><br />
                                                    <div style="font-size: 12px">
                                                        @@^2^@@
                                                    </div>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                        </TitlebarTemplate>
                                    </telerik:RadDock>
                                </telerik:RadDockZone>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </telerik:RadDockLayout>
Slav
Telerik team
 answered on 26 Oct 2012
4 answers
91 views
I'm using RadGrid from your latest ASP.NET AJAX controls suite.  I'm currently only using the UseStaticHeaders option and am doing nothing with Ajax but the grid still complains if I don't have ASP.NET's ScriptManager on the page.  Is there any way to remove this requirement when I'm not using Ajax? 

Also, given I'm using only UseStaticHeaders, I would like to NOT use EnabledEmbedScripts and only add the ones I really need to have the grid work properly.  Is there a reference somewhere that can tell me what I need to add?

I'm trying to trim the fat on the page so I can ensure it loads as fast as possible.  (Yes I know all of those resources are cached but it still takes ~ 1-2 seconds to reload the page from cache)
Vasil
Telerik team
 answered on 26 Oct 2012
1 answer
440 views
Hi,
I'm having issue when I run my website on the Reverse Proxy layer. It will display the following javascript error.

These error are displayed in the frontend view:
=> Message: 'Sys.WebForms.PageRequestManager' is null or not an object
=> Message: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.
Parameter name: instance

These error are displayed in the backend view:
=> Message: 'Sys.WebForms.PageRequestManager' is null or not an object
=> Message: 'Telerik' is undefined
=> Message: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.
Parameter name: instance

They are all pointing to the "ScriptResource.axd" file and default file (frontend and backend).

When I run the website on the application layer, there is no error as shown above.

Is there any configuration need to enable reverse proxy server(ARR) to work?

Sitefinity verison: 3.6

Thanks.
Karl Maynard
Top achievements
Rank 1
 answered on 26 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?