Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
129 views
Hi..
         I am getting the following error while i am trying to export the grid data into PDF..I have the grid which is having nested grid also inside of it.

System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

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.SystemException: System.NullReferenceException: Object reference not set to an instance of an object.
  at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
  at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
  at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
  at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
  at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

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:

[SystemException: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
   at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
   at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
   at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
   at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
   at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
   at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)]
   Telerik.Web.Apoc.ApocDriver.FireApocError(String message) +122
   Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader) +951
   Telerik.Web.Apoc.ApocDriver.Render(XmlReader inputReader, Stream outputStream) +293
   Telerik.Web.Apoc.ApocDriver.Render(TextReader inputReader, Stream outputStream) +61
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +2018
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8673113
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderPage(HtmlTextWriter nullWriter, Control page) +161
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +825
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


I am unable to find the bug.So looking forward to hear from you.


Daniel
Telerik team
 answered on 12 Feb 2010
1 answer
132 views
I have a drop down menu that displays an "arrow" section to scroll down to items that would normally render at the bottom of the page. I don't want this scrolling effect to be used at all, if the menu is too long and goes past the page length I want it to just display past the page. How do I disable this function?
Veronica
Telerik team
 answered on 12 Feb 2010
5 answers
465 views
Hello,

we have changed the Grid behaviour to support a "Single Group Expand/Collapse" mechanism. The property "GroupsDefaultExpanded" is set to false on the MasterTableView. Paging is set to false by default, the PageSize is set to 15 by default.
The DataSource contains 150 items, which are configured to build 5 groups.

When a group is expanded, the ItemCommand event handler is called, which collapses all group headers and expands the currently selected. AllowPaging is set to true and then "Rebind()" is called.

Consider the following scenario:
1.) The page is initially called.
2.) The DataSource is added in the NeedDataSource event.
3.) The Grid is build with 5 groups, no paging enabled, all is fine.

4.) The third group expand button is clicked.
5.) The ItemCommand event handler gets called and processes the steps as defined above.
6.) The NeedDataSource event handler gets called and retrieved the Items based on the selected group header. (This data is transfered from the ItemCommand event handler). The DataSource contains now 34 entries. 4 just to build the groups, and 30 detail entries for the group to expand.
7.) The ItemCreated and ItemDataBound event handler gets called.


Result:
The page now displays 3 Groups, the second with an expanded image button, but no items in the group. The paging bar contains figures for the three pages. Now I click on the second page, back to the first page.
After that, the first page is displayed as expected: The first and second Groups are collapsed, the third is openned and displays the items.


When now another group (say the second) is openned, the same happens: The first group is initial collapsed, the second expanded, but no items in it. After using paging, the page looks like expected.

Could you please help me to determine the issue, why group items are displayed only after a paging event? Is there some call missing?

Following is some Code from the ItemCommand event handler:
if (e.CommandName == RadGrid.ExpandCollapseCommandName) 
            { 
                GridGroupHeaderItem groupHeaderItem = (GridGroupHeaderItem) e.Item; 
                 
                GridItem[] groupHeaderItems = grid.MasterTableView.GetItems(GridItemType.GroupHeader);  
                // collapse all group header items currently on the page to support a "single open group" effect  
                foreach (GridGroupHeaderItem grpHeaderItem in groupHeaderItems) 
                { 
                    grpHeaderItem.Expanded = false;  
                } 
 
                // When "Expand" is clicked, the expanded state is set to false. Therefore, the division from this group header  
                // needs to be read. When "Collapse" is clicked, the state is assigned "true"  
                if (!groupHeaderItem.Expanded) 
                { 
                    string currentDivision = this.GetDivisionFromGroupHeader(groupHeaderItem); 
                    new ObjectLifecycleHelper(this.Page, this.ViewState).SetCurrentSelectedGridDivision(currentDivision); 
                     
                    groupHeaderItem.Expanded = true; 
                } 
 
                if (!grid.AllowPaging) 
                { 
                    grid.AllowPaging = true; 
                    grid.PageSize = 15;  
                } 
                // rebind in each case, because otherwise the Expanded/Collapsed state is not changed by the view  
                grid.Rebind(); 



Thanks for your support!

Sincereley,
Johann
Radoslav
Telerik team
 answered on 12 Feb 2010
1 answer
88 views
I am using a vertical menu, it is using the Sitefinity skin and the center in a div CSS from this post: http://www.telerik.com/community/forums/aspnet-ajax/menu/centering-menu-in-a-div.aspx

How can I also get the menu item separator to be 100% width?
Yana
Telerik team
 answered on 12 Feb 2010
0 answers
142 views
nevermind, you can disregard this post I figured this out!

Thanks!
Mike
Top achievements
Rank 1
 asked on 12 Feb 2010
1 answer
128 views
I edit webpages in a browser editor. I have googled one of the editor CSS style names and traced it to RadDock and hence to this forum. Would this editor be a derived application or a product of RadDock? I am seeking knowledge on configuring the Editor CSS styles. If someone could point me in the right direction I'd be grateful.

Many thanks for your time.
Schlurk
Top achievements
Rank 2
 answered on 12 Feb 2010
1 answer
124 views
Hi Guys,

I want to include a progress area in my companies new web portal, but when I add it to the page it just won't show up at all. It is clearly there in the design view but just doesn't want to work. I have also tried just to create a simple test project and it does not show on that project either. I have done all of the necessary registations for the config file. I have also looked at your support page at:

http://www.telerik.com/help/aspnet-ajax/upload_troubleshootingnoradprogressarea.html

..But I cannot see what I am doing wrong.

Here is the code for my test project:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
    <telerik:RadProgressManager ID="RadProgressManager1" runat="server" /> 
    <div> 
        <telerik:RadUpload ID="RadUpload1" runat="server" TargetFolder="~/Upload" OverwriteExistingFiles="true" /> 
        <br /> 
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="btnSubmit_Click" /> 
        <telerik:RadProgressArea ID="RadProgressArea1" runat="server" /> 
    </div> 
    </form> 
</body> 
</html> 
 

Also here is my config file:

<?xml version="1.0"?> 
<!--  
    Note: As an alternative to hand editing this file you can use the  
    web admin tool to configure settings for your application. Use 
    the Website->Asp.Net Configuration option in Visual Studio. 
    A full list of settings and comments can be found in  
    machine.config.comments usually located in  
    \Windows\Microsoft.Net\Framework\v2.x\Config  
--> 
<configuration> 
  <configSections> 
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> 
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> 
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        </sectionGroup> 
      </sectionGroup> 
    </sectionGroup> 
  </configSections> 
  <appSettings /> 
  <connectionStrings /> 
  <system.web> 
    <!--  
            Set compilation debug="true" to insert debugging  
            symbols into the compiled page. Because this  
            affects performance, set this value to true only  
            during development. 
        --> 
    <compilation debug="true"> 
      <assemblies> 
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
      </assemblies> 
    </compilation> 
    <!-- 
            The <authentication> section enables configuration  
            of the security authentication mode used by  
            ASP.NET to identify an incoming user.  
        --> 
    <authentication mode="Windows" /> 
    <!-- 
            The <customErrors> section enables configuration  
            of what to do if/when an unhandled error occurs  
            during the execution of a request. Specifically,  
            it enables developers to configure html error pages  
            to be displayed in place of a error stack trace. 
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> 
            <error statusCode="403" redirect="NoAccess.htm" /> 
            <error statusCode="404" redirect="FileNotFound.htm" /> 
        </customErrors> 
        --> 
    <pages> 
      <controls> 
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      </controls> 
    </pages> 
    <httpHandlers> 
      <remove verb="*" path="*.asmx" /> 
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> 
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" /> 
    </httpHandlers> 
    <httpModules> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" /> 
    </httpModules> 
  </system.web> 
  <system.codedom> 
    <compilers> 
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> 
        <providerOption name="CompilerVersion" value="v3.5" /> 
        <providerOption name="WarnAsError" value="false" /> 
      </compiler> 
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> 
        <providerOption name="CompilerVersion" value="v3.5" /> 
        <providerOption name="OptionInfer" value="true" /> 
        <providerOption name="WarnAsError" value="false" /> 
      </compiler> 
    </compilers> 
  </system.codedom> 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <modules> 
      <remove name="ScriptModule" /> 
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" /> 
    </modules> 
    <handlers> 
      <remove name="WebServiceHandlerFactory-Integrated" /> 
      <remove name="ScriptHandlerFactory" /> 
      <remove name="ScriptHandlerFactoryAppServices" /> 
      <remove name="ScriptResource" /> 
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> 
      <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" /> 
    </handlers> 
  </system.webServer> 
  <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
      <dependentAssembly> 
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" /> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" /> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
      </dependentAssembly> 
    </assemblyBinding> 
  </runtime> 
</configuration> 

Cheers,

Ian W





Veselin Vasilev
Telerik team
 answered on 12 Feb 2010
2 answers
150 views
I am using 2008 q2 and I have a chart that the legend is overlapping the chart.  how can I get it so it doesnt do this.
John Giblin
Top achievements
Rank 1
 answered on 12 Feb 2010
1 answer
106 views
Hi-

Is it possible to put a RadDock inside a RadPanelItem and have it dock to other docks on the page. Trying to create a "menu" of docks. Also, is it possible that when the dock is dropped to a zone, it copies to the zone leaving the original. Again, like a menu of docks that can be placed in zones on a page.


Thanks
Yana
Telerik team
 answered on 12 Feb 2010
3 answers
157 views
I have a RadGrid that draws its data from a SP that is effectively the hours user load on a system by day sorted newest to oldest.

Date,0000,0100,0200,...2200,2300
2/10/2010, 12,45,65,....32,10
2/9/2010, 9,56,123,....65,23


I set the Page Size to 7  to effectively show me the last 7 days of data in the grid.  I ahve created a RadChart above the grid and would like it to display each of the 7 days  on the chart with the X-Axis being the Hour of the Day, and the legend reflecting the data.

aspx page
<asp:Content ID="Content2" runat="Server" ContentPlaceHolderID="Main">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
 
    <script type="text/javascript" language="javascript">  
        function onRequestStart(sender, args) {  
            if (args.get_eventTarget().indexOf("imgbtn_xls") >= 0 ||  
                    args.get_eventTarget().indexOf("imgbtn_doc") >= 0) {  
 
                args.set_enableAjax(false);  
            }  
        }  
    </script> 
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="ReportGrid">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="ReportGrid" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <div class="boxlist" style="width: 1020px; left: -2px; top: 5px;">  
        <table width="100%">  
            <tr> 
                <th class="shaded" width="100%" colspan="2">  
                    <%=(string)Session["myPageName"] %> 
                </th> 
            </tr> 
            <tr> 
                <td> 
                </td> 
                <th style="text-align: right;">  
                    <input type="button" value="Admin Home" onclick="location.href='Admin_Home.aspx'" /> 
                </th> 
            </tr> 
        </table> 
        <table width="100%">  
            <tr> 
                <th> 
                    Page Hits by Day  
                </th> 
            </tr> 
            <tr> 
            <td> 
            <telerik:RadChart ID="RadChart1" runat="server" Height="350px" Width="1010px" Skin="default" 
             Legend-Visible="false"   
            ChartTitle-TextBlock-Text="Page Statistics by Day (7 day view)" DefaultType="Line">  
             
 
 
 
<Legend Visible="False">  
<Appearance Visible="False"></Appearance> 
</Legend> 
             
 
        </telerik:RadChart> 
 
            </td> 
            </tr> 
            <tr> 
                <td style="text-align: right;">  
                    <table> 
                        <tr> 
                            <td> 
                                <asp:ImageButton ID="imgbtn_xls" runat="server" AlternateText="Export to Excel" ImageUrl="~/images/xls.png" 
                                    OnClick="imgbtn_xls_Click" /> 
                            </td> 
                            <td> 
                                <asp:ImageButton ID="imgbtn_doc" runat="server" AlternateText="Export to Word" ImageUrl="~/images/doc.png" 
                                    OnClick="imgbtn_doc_Click" /> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td> 
                    <telerik:RadGrid ID="grdApplicationStatistics" runat="server" ExportSettings-IgnorePaging="true" 
                        HeaderStyle-Font-Bold="true" Font-Names="tahoma" PageSize="7" AllowPaging="true"   
                        Width="1010px" Skin="Default" EnableEmbeddedSkins="false" OnPageIndexChanged="grdApplicationStatistics_PageIndexChanged">  
                        <ExportSettings IgnorePaging="true" FileName="PageStatsbyDay" OpenInNewWindow="true" 
                            ExportOnlyData="false">  
                        </ExportSettings><PagerStyle Mode="NextPrev" /> 
 
                        <ClientSettings EnableRowHoverStyle="true">  
                            <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" 
                                AllowColumnResize="True"></Resizing> 
                            <Selecting AllowRowSelect="true" /> 
                        </ClientSettings> 
                        <MasterTableView PageSize="7">  
                        </MasterTableView> 
                    </telerik:RadGrid> 
                </td> 
            </tr> 
        </table> 
    </div> 
</asp:Content> 

codebehind page
using System;  
using System.Collections;  
using System.ComponentModel;  
using System.Data;  
using System.Drawing;  
using System.Configuration;  
 
using System.Web;  
using System.Web.SessionState;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.HtmlControls;  
using Telerik.Web.UI;  
using Telerik.Charting;   
 
namespace XXXXXXXXXX.XXXXXX{  
    /// <summary> 
    /// Summary description for Stats.  
    /// </summary> 
    public partial class PTOPageStatsbyDay : PTOBasePage  
    {  
 
        protected void Page_Load(object sender, System.EventArgs e)  
        {  
            Session["myPageName"] = "PTO Page Stats by Day";  
            this.Master._pageLabel = (string)Session["myPageName"];  
            Session["HelpPage"] = "";  
 
            //label_myPageName.Text = (string)Session["myPageName"];  
 
            if (!IsPostBack)  
            {  
                User user = (User)Session["USER"];  
                //Insure that the user has proper credentials for this page.  
                if (!user.Sys_Role.Equals("S"))  
                {  
                    Response.Redirect((String)ConfigurationManager.AppSettings["SYS_NOAUTH_PAGE"]);  
                    Application["i"] = null;  
                }  
                getData();  
            }  
            grdApplicationStatistics.MasterTableView.RenderColumns[1].Display = false;  
 
        }  
        protected void getData()  
        {  
 
            DataAccess da = new DataAccess();  
 
            DateTime dt = DateTime.Now;  
            // Get year, month, and day  
            int year = dt.Year;  
            DataSet ds = da.Report_PageStatisticsbyDay(year);  
            grdApplicationStatistics.DataSource = ds;  
            grdApplicationStatistics.DataBind();    
 
            RadChart1.DataSource = ds;  
            int curIndex = grdApplicationStatistics.CurrentPageIndex;  
            int myStart = (curIndex-1)*grdApplicationStatistics.PageSize;  
            int myEnd = (curIndex) * grdApplicationStatistics.PageSize;  
            int myCntr = 0;  
            foreach (ChartSeries series in RadChart1.Series)  
            {  
                series.Appearance.LabelAppearance.Visible = false;  
                series.Visible = false;  
                if (myCntr >=myStart && myCntr<=myEnd)  
                    series.Visible = true;  
            }     
            myCntr++;  
 
 
            RadChart1.DataBind();  
 
        }  
        protected void grdApplicationStatistics_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)  
        {  
            getData();  
        }  
        protected void imgbtn_xls_Click(object sender, System.EventArgs e)  
        {  
            grdApplicationStatistics.AllowPaging = false;  
            grdApplicationStatistics.ExportSettings.IgnorePaging = true;  
            getData();  
            grdApplicationStatistics.MasterTableView.ExportToExcel();  
        }  
 
        protected void imgbtn_doc_Click(object sender, System.EventArgs e)  
        {  
            grdApplicationStatistics.AllowPaging = false;  
            grdApplicationStatistics.ExportSettings.IgnorePaging = true;  
 
            getData();  
            grdApplicationStatistics.MasterTableView.ExportToWord();  
        }  
        #region Web Form Designer generated code  
        override protected void OnInit(EventArgs e)  
        {  
            //  
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.  
            //  
            InitializeComponent();  
            base.OnInit(e);  
        }  
 
        /// <summary> 
        /// Required method for Designer support - do not modify  
        /// the contents of this method with the code editor.  
        /// </summary> 
        private void InitializeComponent()  
        {  
 
        }  
        #endregion  
    }  
}  
 

1) How do I get the RADChart to chart the data so that I have 7 series (one for each day displayed on the radgrid), and allow the 24 fields to be charted in the series.
2) Handle going to the next page and refreshing the RadChart to the RadGrid Display

I have been trying (with very little luck) for far too many hours to lick this, any help would be greatly appreciated..


Thanks
Harry Anderson
harry.k.anderson@wellsfargo.com
Harry Anderson
Top achievements
Rank 1
 answered on 12 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?