Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
55 views
Hello all

We're using a fairly oldish release (2010.3.1317.40) on Windows 7 using IE9.  Currently this is needed due to the amount of testing already performed with this version, so the customer is reticent to update to the latest version if it's all avoidable.

We're having a problem with performance when selecting a row in a RadGrid with a 1000 rows

It takes 1.5 seconds on the first time a row is selected, and then 0.75 seconds on subsequent selections.  This is more than enough for a user to notice the lag.

In Firefox selecting a row takes up 0.15 seconds.

Note that in both cases a callback is being made back to the server.  I've profiled this and that's taking 0.12 seconds, so the Firefox response time seems more than adequate.

Any ideas what can be causing this problem, or is it a problem with IE?

Thanks in advance.
Richard
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
296 views
Hi,


    I used a Link button in listview itemtemplate.I need to redirect to a page in a new window.
But, I unable to find the solution.. It does not redirect to..


My code is here...
 
<telerik:RadAjaxPanel ID="rAjaxPnlForumsCategory" runat="server" LoadingPanelID="rAjaxLoadingPnlForumsCategory">
    <div style="border-top:1px solid #828282; border-bottom:1px solid #828282;">
 
        <telerik:RadListView ID="rlstviewReply" runat="server" Width="100%"
                             DataKeyNames="ForumPostReplyID"
                             OnNeedDataSource="rlstviewReply_NeedDataSource"
                             OnItemDataBound="rlstviewReply_ItemDataBound">
            <ItemTemplate >
                <table width="100%">
                    <tr>
                        <td>
                            Replied by
                            <asp:LinkButton ID="lnkbtnCandidateName" runat="server" OnCommand="lnkbtnCandidateName_Command" Enabled="false"  CssClass="_TextBoldSubCategory"></asp:LinkButton>
                          <span> On <asp:Label ID="lblCreatedOn" runat="server" Text=""></asp:Label></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="divReply" runat="server" class="_PaddingTop5 _PaddingBottom5"><%# Eval("Reply") %></div>
                        </td>
                    </tr><tr><td id="Td1" runat="server" visible='<%# (Container.DataItemIndex + 1).ToString() != hidCount.Value  %>' align="center" class="DottedLineBottom2" style="text-align:center;"></td></tr>
                        
                </table>
            </ItemTemplate>
        </telerik:RadListView>
    </div>
  
    <div class="_PaddingTop20">
        Post your reply
        <div class="_PaddingTop20">    
        <telerik:RadEditor runat="server" Skin="Telerik" ToolsFile="~/Forums/RadEditorTools.xml"  ContentAreaCssFile="~/Styles/Editorstyle.css"
                           ID="radeditorReply" Width="100%">
        </telerik:RadEditor>
        <asp:RequiredFieldValidator CssClass="ErrorMessage" ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="radeditorReply" ValidationGroup="reply"></asp:RequiredFieldValidator>
        </div>
    </div>
    <div class="_PaddingTop5" style="text-align :center;">
        <telerik:RadButton ID="btnSubmit" runat="server" Text="SUBMIT" onclick="btnSubmit_Click" ValidationGroup="reply">
        </telerik:RadButton>
    </div>
    <div> </div>
</telerik:RadAjaxPanel>
<asp:HiddenField ID="hidCount" runat="server" />
 
 
        protected void rlstviewReply_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
        {
            try
            {
                if (!(e.Item is RadListViewDataItem))
                {
                    return;
                }
 
                if (e.Item is RadListViewItem)
                {
                    RadListViewDataItem rlvItem = (RadListViewDataItem)e.Item;
 
                    LinkButton lnkbtnCandidateName = (LinkButton)rlvItem.FindControl("lnkbtnCandidateName");
                    Label lblCreatedOn = (Label)rlvItem.FindControl("lblCreatedOn");
 
                    ForumPostReplies forumpostsreply = (ForumPostReplies)rlvItem.DataItem;
                    if (forumpostsreply == null)
                    {
                        return;
                    }
 
                    lnkbtnCandidateName.Text = string.Format("{0}", forumpostsreply.Users.UserName);
                    lblCreatedOn.Text = forumpostsreply.CreatedOn.ToString("g");
 
                    if (SessionHandler.User.UserTypeID == (int)FrameworkConstants.USER_TYPE.Employer)
                    {
                        lnkbtnCandidateName.Enabled = true;
                        lnkbtnCandidateName.CommandArgument = forumpostsreply.Users.UserID.ToString();
                        lnkbtnCandidateName.Attributes.Add("OnClick", " window.location.href =" + FrameworkConstants.PROJECT_PAGES.CANDIDATE_PROFILE.Description() + ");");
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorLogging.AddErrorLog(ex);
            }
        }
 
        protected void lnkbtnCandidateName_Command(object sender, CommandEventArgs e)
        {
            try
            {
                if (e.CommandArgument == null)
                {
                    return;
                }
 
                long userID = 0;
                if (long.TryParse(e.CommandArgument.ToString(), out userID))
                {
                    Session[FrameworkConstants.SESSION_VARIABLES.CANDIDATEID.ToString()] = userID;
                }
            }
            catch (Exception ex)
            {
                ErrorLogging.AddErrorLog(ex);
            }
        }


Thank you in advance...
Richard
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
79 views
I am trying to format a spreadsheet that I am exporting. I have had to add some hidden columns in the grid so I could use the Data.DataItem in the ExcelMLExportRowCreated event to do some calculations to determine if a date should be highlighted or not. In my click event for my export button I am setting them to visible so I have access to the value. It appears if they are hidden I cannot access this value in the ExcelMLExportRowCreated. The issue is that I don't want these values in the actual spreadsheet. I just want to use them in the calculation. Am I going about this the wrong way?
Chris
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
89 views
I'm wanting to use something on my page similar to what is used on the main page of telerik.com as far as the navigation dots go. Is there an example out there that I'm not seeing that I could use as a reference on how to go about building this and syncing the data up with the current item?

Thanks

-Geoff
Slav
Telerik team
 answered on 13 Jun 2012
1 answer
104 views
I have added a label ADD in  slot and i want to popup AdvancedInsert window after clicking ADD as in Outlook.
how can i do it?

One more thing i want to know is when i am clicking option then the insertAdvanceTemplate opens but the page get refreshed. what can i do for getting this in same page?
Ivana
Telerik team
 answered on 13 Jun 2012
1 answer
137 views
I have a bar chart from an SqlDataSource working well.  By default, all bars (series) are the same color.  I would to be able to set each color programatically as they are added to the chart.  How do I capture the series bounding event? 

Thank you.

Marin Bratanov
Telerik team
 answered on 13 Jun 2012
2 answers
77 views
I have a web page where I am attempting to use aschycronous service calls to update different series of a line chart to produce three lines. This code works when done schyronously (causes the UI thread to wait, making the app look hung up...), but when hooked up this way my web app is responsive, but I get only one line in my chart, my question is: why? Is it the Ajax panel? Am I doing this the wrong way?
private void fillchart(RadChart chart, int chartSeriesID, List<decimal> dataPoints)
{
    // For display of empty grids:
    if (dataPoints.Count < 1) { dataPoints.Add(-1.00M); }
 
    double y = 0;
    double x = 0;
    chart.Series[chartSeriesID].Clear();
    foreach (decimal point in dataPoints)
    {
        y = double.Parse(point.ToString());
        ChartSeriesItem item = new ChartSeriesItem(x, y);
        item.PointAppearance.Figure = "*";  // Telerik.Charting.Styles.DefaultFigures.Star6; // Appearance.ItemMarkerAppearance.Figure = Telerik.Charting.Styles.DefaultFigures.Diamond;
        chart.Series[chartSeriesID].AddItem(item);
        x++;
    }
}
 
#region ChartOriginalTerm:
private void FillChartOriginalTerm(int? loanImportID, int? SellerID)
{
    chartOriginalTerm.Series.ClearItems();
    chartOriginalTerm.Chart.PlotArea.YAxis.Clear();
    chartOriginalTerm.Chart.PlotArea.YAxis.AddRange(0, 100, 10);
    chartOriginalTerm.Chart.PlotArea.YAxis.MaxValue = 100;
    chartOriginalTerm.Chart.PlotArea.YAxis.MinValue = 0;
    chartOriginalTerm.Chart.PlotArea.YAxis.AutoScale = false;
    for (int i = 0; i < chartOriginalTerm.Chart.PlotArea.YAxis.Items.Count; i++)
        chartOriginalTerm.Chart.PlotArea.YAxis[i].TextBlock.Text = chartOriginalTerm.Chart.PlotArea.YAxis[i].TextBlock.Text + "%";
 
    ws.GetOrigianlTermChartValuesCompleted += new EventHandler<GetOrigianlTermChartValuesCompletedEventArgs>(ws_GetOrigianlTermChartValuesCompleted);
    ws.GetOrigianlTermChartValuesAsync(loanImportID, SellerID);
 
    if (loanImportID != null)
    {   // Fill second line with Just the selected Import:
        ws.GetOrigianlTermChartValuesCompleted += new EventHandler<GetOrigianlTermChartValuesCompletedEventArgs>(ws_GetOrigianlTermChartValuesCompletedLoanImportCompleted);
        ws.GetOrigianlTermChartValuesAsync(loanImportID, null);
    }
 
    if ((SellerID != null) && (SellerID > 0))
    {   // Fill third line with the Seller Company only data
        ws.GetOrigianlTermChartValuesCompleted += new EventHandler<GetOrigianlTermChartValuesCompletedEventArgs>(ws_GetOrigianlTermChartValuesCompletedSellerCompleted);
        ws.GetOrigianlTermChartValuesAsync(null, SellerID);
    }
}
 
private void ws_GetOrigianlTermChartValuesCompletedLoanImportCompleted(object sender, GetOrigianlTermChartValuesCompletedEventArgs e)
{
    ws.GetOrigianlTermChartValuesCompleted -= ws_GetOrigianlTermChartValuesCompletedLoanImportCompleted;
    List<decimal> data1 = e.Result;
    fillchart(this.chartOriginalTerm, 1, data1);
    chartOriginalTerm.Series[1].Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;
    chartOriginalTerm.Series[1].Appearance.LineSeriesAppearance.PenStyle = System.Drawing.Drawing2D.DashStyle.Solid;
    chartOriginalTerm.Series[1].Appearance.LineSeriesAppearance.Width = 2;
    chartOriginalTerm.Series[1].Appearance.LineSeriesAppearance.StartCap = System.Drawing.Drawing2D.LineCap.RoundAnchor;
    chartOriginalTerm.Series[1].Appearance.LineSeriesAppearance.EndCap = System.Drawing.Drawing2D.LineCap.RoundAnchor;
}
 
private void ws_GetOrigianlTermChartValuesCompletedSellerCompleted(object sender, GetOrigianlTermChartValuesCompletedEventArgs e)
{
    ws.GetOrigianlTermChartValuesCompleted -= ws_GetOrigianlTermChartValuesCompletedSellerCompleted;
    List<decimal> data2 = e.Result;
    fillchart(this.chartOriginalTerm, 2, data2);
    chartOriginalTerm.Series[2].Appearance.LineSeriesAppearance.Color = System.Drawing.Color.DarkBlue;
    chartOriginalTerm.Series[2].Appearance.LineSeriesAppearance.PenStyle = System.Drawing.Drawing2D.DashStyle.Solid;
    chartOriginalTerm.Series[2].Appearance.LineSeriesAppearance.Width = 2;
    chartOriginalTerm.Series[2].Appearance.LineSeriesAppearance.StartCap = System.Drawing.Drawing2D.LineCap.SquareAnchor;
    chartOriginalTerm.Series[2].Appearance.LineSeriesAppearance.EndCap = System.Drawing.Drawing2D.LineCap.SquareAnchor;
}
 
private void ws_GetOrigianlTermChartValuesCompleted(object sender, GetOrigianlTermChartValuesCompletedEventArgs e)
{
    // Fill the first line with ALL the ILS portfolio:
    ws.GetOrigianlTermChartValuesCompleted -= ws_GetOrigianlTermChartValuesCompleted;
 
    List<decimal> data0 = e.Result;
    fillchart(this.chartOriginalTerm, 0, data0);
    chartOriginalTerm.Series[0].Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Black;
    chartOriginalTerm.Series[0].Appearance.LineSeriesAppearance.PenStyle = System.Drawing.Drawing2D.DashStyle.Solid;
    chartOriginalTerm.Series[0].Appearance.LineSeriesAppearance.Width = 2;
    chartOriginalTerm.Series[0].Appearance.LineSeriesAppearance.StartCap = System.Drawing.Drawing2D.LineCap.DiamondAnchor;
    chartOriginalTerm.Series[0].Appearance.LineSeriesAppearance.EndCap = System.Drawing.Drawing2D.LineCap.DiamondAnchor;
}
#endregion

<asp:Content ID="Content3" ContentPlaceHolderID="Column1" runat="server">
    <div class="dynamic_box" style="width: 95%; height: 425px;" >
        <telerik:RadAjaxPanel ID="RadAjaxPanelColumn1" runat="server" EnableAJAX="true" LoadingPanelID="ajaxLoadingPanel">
            <br /><h2>Choose a Loan Pool:<br /></h2>
 
            <telerik:RadComboBox ID="ddlSeller" runat="server" Width="95%" AutoPostBack="True"
                OnSelectedIndexChanged="ddlSeller_SelectedIndexChanged" DataTextField="Value"
                DataValueField="Key">
            </telerik:RadComboBox><br />
 
            <telerik:RadComboBox ID="ddlLoanPackage" runat="server" Width="95%" Height="150px"
                AutoPostBack="True" OnSelectedIndexChanged="ddlLoanPackage_SelectedIndexChanged"
                Enabled="false" EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                OnItemsRequested="ddlLoanPackage_ItemsRequested" ItemsPerRequest="20">
            </telerik:RadComboBox>
 
            <br clear="all" />
             
            <div style="height: 90px; width: 100%">
                <div style="float: left; margin: 0px 10px 0px 10px;  padding: 5px 0pc 0px 0px; text-align: center; font-size: 16px; font-weight: bold;">
                    <asp:ImageButton ID="btnImportName" runat="server" OnClick="btnLoadLoanImport_Click" ImageUrl="~/images/icon_dashboard.png" />
                </div>
                <div style="text-align: left;">
                    <h2 style="display: inline-block; margin: 10px 0px 10px 0px;">
                        <asp:Label runat="server" ID="lbtnSellerName">Status Snapshot</asp:Label>
                    </h2>
                    <h3 style="display: inline-block; margin: 10px 0px 10px 0px;">
                        <asp:LinkButton runat="server" ID="lblImportName" OnClick="imgBtnLoadLoanImport_Click" />
                    </h3>
                </div>
            </div>
            <br clear="all" />
 
            <table border="0" cellpadding="2" cellspacing="0" style="text-align: right; width: 100%">
                <tr>
                    <td class="FieldLabel" width="250px"># of Units:</td>
                    <td><asp:Label runat="server" ID="lblUnitsCount" /></td>
                    <td class="FieldLabel" width="250px">Wtd APR:</td>
                    <td><asp:Label runat="server" ID="lblWtdAPR" /></td>
                </tr>
                <tr>
                    <td class="FieldLabel" width="250px">Orig. Balance:</td>
                    <td><asp:Label runat="server" ID="lblOriginalBalance" /></td>
                    <td class="FieldLabel" width="250px">Wtd Avg Model Yr:</td>
                    <td><asp:Label runat="server" ID="lblWtdAvgModelYear" /></td>
                </tr>
                <tr>
                    <td class="FieldLabel" width="250px">Curr. Balance:</td>
                    <td><asp:Label runat="server" ID="lblCurrentBalance" /></td>
                    <td class="FieldLabel" width="250px">Wtd Avg Mileage:</td>
                    <td><asp:Label runat="server" ID="lblWtdAvgMileage" /></td>
                </tr>
                <tr>
                    <td class="FieldLabel" width="250px">Wtd Orig. Term(mos):</td>
                    <td><asp:Label runat="server" ID="lblWtdOriginalTerm" /></td>
                    <td class="FieldLabel" width="250px">Wtd Bureau Score:</td>
                    <td><asp:Label runat="server" ID="lblWtdBureauScore" /></td>
                </tr>
                <tr>
                    <td class="FieldLabel" width="250px">Wtd Rem. Term:</td>
                    <td><asp:Label runat="server" ID="lblWtdRemainingTerm" /></td>
                    <td class="FieldLabel" width="250px">Wtd LTV:</td>
                    <td><asp:Label runat="server" ID="lblWtdLTV" /></td>
                </tr>
                <tr>
                    <td class="FieldLabel" width="250px">Wtd Seasoning:</td>
                    <td><asp:Label runat="server" ID="lblWtdSeasoning" /></td>
                    <td class="FieldLabel" width="250px">Wtd LTV Clean:</td>
                    <td><asp:Label runat="server" ID="lblWtdLTVClean" /></td>
                </tr>
                <tr>
                    <td colspan="4" class="FieldLabel"><hr /></td>
                </tr>
                <tr>
                    <td style="text-align: left;"><strong>Payment Period:</strong></td>
                    <td class="FieldLabel">% Monthly:</td>
                    <td><asp:Label runat="server" ID="lblPaymentPeriodMonthly" /></td>
                    <td> </td>
                </tr>
                <tr>
                    <td> </td>
                    <td class="FieldLabel">BW/SM/W:</td>
                    <td><asp:Label runat="server" ID="lblPaymentPeriodOther" /></td>
                    <td> </td>
                </tr>
            </table>
        </telerik:RadAjaxPanel>
    </div>
    <div class="dynamic_box" style="width: 95%">
        <telerik:RadAjaxPanel ID="apnlChartOriginalTerm" runat="server" LoadingPanelID="ajaxLoadingPanel">
            <telerik:RadChart ID="chartOriginalTerm" runat="server" Skin="Mac" Width="490px" AutoLayout="True" DefaultType="Line" IntelligentLabelsEnabled="True">
                <ClientSettings EnableZoom="false" ScrollMode="None" />
                <Appearance Corners="Round, Round, Round, Round, 6">
                    <FillStyle FillType="Image">
                        <FillSettings BackgroundImage="{chart}" ImageDrawMode="Flip" ImageFlip="FlipX" />
                    </FillStyle>
                    <Border Color="138, 138, 138" />
                </Appearance>
                <Series>
                    <telerik:ChartSeries Type="Line" Name="Full ILS Profolio" DataYColumn="ProfolioPercent1" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Diamond">
                            <FillStyle MainColor="55, 167, 226" SecondColor="22, 85, 161">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Type="Line" Name="Import Profolio" DataYColumn="ProfolioPercent2" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Triangle">
                            <FillStyle MainColor="223, 87, 60" SecondColor="200, 38, 37">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Type="Line" Name="Seller's Profolio" DataYColumn="ProfolioPercent3" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Star3">
                            <FillStyle MainColor="118, 203, 76" SecondColor="73, 166, 22">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                </Series>
                <Legend>
                    <Appearance Overflow="Row" Dimensions-Margins="1%, 1%, 1%, 1%" Position-AlignedPosition="Top">
                        <ItemMarkerAppearance Figure="Diamond" >
                            <Border Color="134, 134, 134" />
                        </ItemMarkerAppearance>
                        <FillStyle MainColor="">
                        </FillStyle>
                        <Border Color="Transparent" />
                    </Appearance>
                </Legend>
                <PlotArea>
                    <EmptySeriesMessage TextBlock-Text=" No data available" />
                    <XAxis DataLabelsColumn="Label" Step="1">
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">
                            <MajorGridLines Color="209, 222, 227" PenStyle="Solid" />
                            <TextAppearance TextProperties-Color="51, 51, 51" />
                        </Appearance>
                        <AxisLabel>
                            <TextBlock>
                                <Appearance TextProperties-Color="51, 51, 51" />
                            </TextBlock>
                        </AxisLabel>
                        <Items>
                            <telerik:ChartAxisItem TextBlock-Text="<=36" Value="0" />
                            <telerik:ChartAxisItem TextBlock-Text="37_42" Value="1" />
                            <telerik:ChartAxisItem TextBlock-Text="43_48" Value="2" />
                            <telerik:ChartAxisItem TextBlock-Text="49_54" Value="3" />
                            <telerik:ChartAxisItem TextBlock-Text="55_60" Value="4" />
                            <telerik:ChartAxisItem TextBlock-Text="61_66" Value="5" />
                            <telerik:ChartAxisItem TextBlock-Text="67_72" Value="6" />
                            <telerik:ChartAxisItem TextBlock-Text=">72" Value="7" />
                        </Items>
                    </XAxis>
                    <YAxis IsLogarithmic="false" Visible="true">
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134" MinorTick-Color="134, 134, 134" MinorTick-Width="0">
                            <MajorGridLines Color="209, 222, 227" />
                            <MinorGridLines Color="233, 239, 241" />
                            <TextAppearance TextProperties-Color="51, 51, 51" />
                        </Appearance>
                        <AxisLabel>
                            <TextBlock Text="% of Portfolio" >
                                <Appearance TextProperties-Color="51, 51, 51" Position-AlignedPosition="TopLeft"  />
                            </TextBlock>
                        </AxisLabel>
                        <Items>
                            <telerik:ChartAxisItem TextBlock-Text="0%" Value="0" />
                            <telerik:ChartAxisItem TextBlock-Text="10%" Value="1" />
                            <telerik:ChartAxisItem TextBlock-Text="20%" Value="2" />
                            <telerik:ChartAxisItem TextBlock-Text="30%" Value="3" />
                            <telerik:ChartAxisItem TextBlock-Text="40%" Value="4" />
                            <telerik:ChartAxisItem TextBlock-Text="50%" Value="5" />
                            <telerik:ChartAxisItem TextBlock-Text="60%" Value="6" />
                            <telerik:ChartAxisItem TextBlock-Text="70%" Value="7" />
                            <telerik:ChartAxisItem TextBlock-Text="80%" Value="8" />
                            <telerik:ChartAxisItem TextBlock-Text="90%" Value="9" />
                            <telerik:ChartAxisItem TextBlock-Text="100%" Value="10" />
                        </Items>
                    </YAxis>
                    <Appearance Dimensions-Margins="8%, 6%, 8%, 6%">
                        <FillStyle FillType="Solid" MainColor="White" />
                        <Border Color="134, 134, 134" />
                    </Appearance>
                </PlotArea>
                <ChartTitle>
                    <Appearance Position-AlignedPosition="Top" Dimensions-Margins="1%, 1%, 1%, 1%" >
                        <FillStyle MainColor="">
                        </FillStyle>
                    </Appearance>
                    <TextBlock Text="Original Term (mos)">
                        <Appearance TextProperties-Font="Tahoma, 13pt" />
                    </TextBlock>
                </ChartTitle>
            </telerik:RadChart>
        </telerik:RadAjaxPanel>
    </div>
    <div class="dynamic_box" style="width: 95%">
        <telerik:RadAjaxPanel ID="apnlChartRemainingTerm" runat="server" LoadingPanelID="ajaxLoadingPanel">
            <telerik:RadChart ID="chartRemainingTerm" runat="server" Skin="Mac" Width="490px" AutoLayout="True" DefaultType="Line" IntelligentLabelsEnabled="True">
                <ClientSettings EnableZoom="false" ScrollMode="None" />
                <Appearance Corners="Round, Round, Round, Round, 6">
                    <FillStyle FillType="Image">
                        <FillSettings BackgroundImage="{chart}" ImageDrawMode="Flip" ImageFlip="FlipX" />
                    </FillStyle>
                    <Border Color="138, 138, 138" />
                </Appearance>
                <Series>
                    <telerik:ChartSeries Type="Line" Name="Full ILS Profolio" DataYColumn="ProfolioPercent1" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Diamond">
                            <FillStyle MainColor="55, 167, 226" SecondColor="22, 85, 161">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Type="Line" Name="Import Profolio" DataYColumn="ProfolioPercent2" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Triangle">
                            <FillStyle MainColor="223, 87, 60" SecondColor="200, 38, 37">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Type="Line" Name="Seller's Profolio" DataYColumn="ProfolioPercent3" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Star3">
                            <FillStyle MainColor="118, 203, 76" SecondColor="73, 166, 22">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                </Series>
                <Legend>
                    <Appearance Overflow="Row" Dimensions-Margins="1%, 1%, 1%, 1%" Position-AlignedPosition="Top">
                        <ItemMarkerAppearance Figure="Square">
                            <Border Color="134, 134, 134" />
                        </ItemMarkerAppearance>
                        <FillStyle MainColor="">
                        </FillStyle>
                        <Border Color="Transparent" />
                    </Appearance>
                </Legend>
                <PlotArea>
                    <EmptySeriesMessage TextBlock-Text=" No data available" />
                    <XAxis DataLabelsColumn="Label" Step="1">
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">
                            <MajorGridLines Color="209, 222, 227" PenStyle="Solid" />
                            <TextAppearance TextProperties-Color="51, 51, 51" />
                        </Appearance>
                        <AxisLabel>
                            <TextBlock>
                                <Appearance TextProperties-Color="51, 51, 51" />
                            </TextBlock>
                        </AxisLabel>
                        <Items>
                            <telerik:ChartAxisItem TextBlock-Text="<=36" Value="0" />
                            <telerik:ChartAxisItem TextBlock-Text="37_42" Value="1" />
                            <telerik:ChartAxisItem TextBlock-Text="43_48" Value="2" />
                            <telerik:ChartAxisItem TextBlock-Text="49_54" Value="3" />
                            <telerik:ChartAxisItem TextBlock-Text="55_60" Value="4" />
                            <telerik:ChartAxisItem TextBlock-Text="61_66" Value="5" />
                            <telerik:ChartAxisItem TextBlock-Text="67_72" Value="6" />
                            <telerik:ChartAxisItem TextBlock-Text=">72" Value="7" />
                        </Items>
                    </XAxis>
                    <YAxis IsLogarithmic="false" Visible="true">
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134" MinorTick-Color="134, 134, 134" MinorTick-Width="0">
                            <MajorGridLines Color="209, 222, 227" />
                            <MinorGridLines Color="233, 239, 241" />
                            <TextAppearance TextProperties-Color="51, 51, 51" />
                        </Appearance>
                        <AxisLabel>
                            <TextBlock Text="% of Portfolio" >
                                <Appearance TextProperties-Color="51, 51, 51" Position-AlignedPosition="TopLeft"  />
                            </TextBlock>
                        </AxisLabel>
                        <Items>
                            <telerik:ChartAxisItem TextBlock-Text="0%" Value="0" />
                            <telerik:ChartAxisItem TextBlock-Text="10%" Value="1" />
                            <telerik:ChartAxisItem TextBlock-Text="20%" Value="2" />
                            <telerik:ChartAxisItem TextBlock-Text="30%" Value="3" />
                            <telerik:ChartAxisItem TextBlock-Text="40%" Value="4" />
                            <telerik:ChartAxisItem TextBlock-Text="50%" Value="5" />
                            <telerik:ChartAxisItem TextBlock-Text="60%" Value="6" />
                            <telerik:ChartAxisItem TextBlock-Text="70%" Value="7" />
                            <telerik:ChartAxisItem TextBlock-Text="80%" Value="8" />
                            <telerik:ChartAxisItem TextBlock-Text="90%" Value="9" />
                            <telerik:ChartAxisItem TextBlock-Text="100%" Value="10" />
                        </Items>
                    </YAxis>
                    <Appearance Dimensions-Margins="8%, 6%, 8%, 6%">
                        <FillStyle FillType="Solid" MainColor="White" />
                        <Border Color="134, 134, 134" />
                    </Appearance>
                </PlotArea>
                <ChartTitle>
                    <Appearance Position-AlignedPosition="Top" Dimensions-Margins="1%, 1%, 1%, 1%" >
                        <FillStyle MainColor="">
                        </FillStyle>
                    </Appearance>
                    <TextBlock Text="Remaining Term (mos)">
                        <Appearance TextProperties-Font="Tahoma, 13pt" />
                    </TextBlock>
                </ChartTitle>
            </telerik:RadChart>
        </telerik:RadAjaxPanel>
    </div>
    <div class="dynamic_box" style="width: 95%">
        <telerik:RadAjaxPanel ID="apnlChartPurchasedBalance" runat="server" LoadingPanelID="ajaxLoadingPanel">
            <telerik:RadChart ID="chartPurchasedBalance" runat="server" Skin="Mac" Width="490px" AutoLayout="True" DefaultType="Line" IntelligentLabelsEnabled="True">
                <ClientSettings EnableZoom="false" ScrollMode="None" />
                <Appearance Corners="Round, Round, Round, Round, 6">
                    <FillStyle FillType="Image">
                        <FillSettings BackgroundImage="{chart}" ImageDrawMode="Flip" ImageFlip="FlipX" />
                    </FillStyle>
                    <Border Color="138, 138, 138" />
                </Appearance>
                <Series>
                    <telerik:ChartSeries Type="Line" Name="Full ILS Profolio" DataYColumn="ProfolioPercent1" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Diamond">
                            <FillStyle MainColor="55, 167, 226" SecondColor="22, 85, 161">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Type="Line" Name="Import Profolio" DataYColumn="ProfolioPercent2" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Triangle">
                            <FillStyle MainColor="223, 87, 60" SecondColor="200, 38, 37">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                    <telerik:ChartSeries Type="Line" Name="Seller's Profolio" DataYColumn="ProfolioPercent3" DefaultLabelValue="#Y{N0}">
                        <Appearance ShowLabels="false" PointShape="Star3">
                            <FillStyle MainColor="118, 203, 76" SecondColor="73, 166, 22">
                                <FillSettings GradientMode="Vertical" />
                            </FillStyle>
                            <TextAppearance TextProperties-Color="Black" />
                            <LineSeriesAppearance Width="2" PenStyle="Solid" />
                        </Appearance>
                    </telerik:ChartSeries>
                </Series>
                <Legend>
                    <Appearance Overflow="Row" Dimensions-Margins="1%, 1%, 1%, 1%" Position-AlignedPosition="Top">
                        <ItemMarkerAppearance Figure="Square">
                            <Border Color="134, 134, 134" />
                        </ItemMarkerAppearance>
                        <FillStyle MainColor="">
                        </FillStyle>
                        <Border Color="Transparent" />
                    </Appearance>
                </Legend>
                <PlotArea>
                    <EmptySeriesMessage TextBlock-Text=" No data available" />
                    <XAxis DataLabelsColumn="Label" Step="1">
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">
                            <MajorGridLines Color="209, 222, 227" PenStyle="Solid" />
                            <TextAppearance TextProperties-Color="51, 51, 51" />
                        </Appearance>
                        <AxisLabel>
                            <TextBlock>
                                <Appearance TextProperties-Color="51, 51, 51" />
                            </TextBlock>
                        </AxisLabel>
                        <Items>
                            <telerik:ChartAxisItem TextBlock-Text="<$5K" Value="0" />
                            <telerik:ChartAxisItem TextBlock-Text="$5K_10K" Value="1" />
                            <telerik:ChartAxisItem TextBlock-Text="$11_15" Value="2" />
                            <telerik:ChartAxisItem TextBlock-Text="$16_20" Value="3" />
                            <telerik:ChartAxisItem TextBlock-Text="$21_25" Value="4" />
                            <telerik:ChartAxisItem TextBlock-Text=">$25" Value="5" />
                        </Items>
                    </XAxis>
                    <YAxis IsLogarithmic="false" Visible="true">
                        <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134" MinorTick-Color="134, 134, 134" MinorTick-Width="0">
                            <MajorGridLines Color="209, 222, 227" />
                            <MinorGridLines Color="233, 239, 241" />
                            <TextAppearance TextProperties-Color="51, 51, 51" />
                        </Appearance>
                        <AxisLabel>
                            <TextBlock Text="% of Portfolio" >
                                <Appearance TextProperties-Color="51, 51, 51" Position-AlignedPosition="TopLeft"  />
                            </TextBlock>
                        </AxisLabel>
                        <Items>
                            <telerik:ChartAxisItem TextBlock-Text="0%" Value="0" />
                            <telerik:ChartAxisItem TextBlock-Text="10%" Value="1" />
                            <telerik:ChartAxisItem TextBlock-Text="20%" Value="2" />
                            <telerik:ChartAxisItem TextBlock-Text="30%" Value="3" />
                            <telerik:ChartAxisItem TextBlock-Text="40%" Value="4" />
                            <telerik:ChartAxisItem TextBlock-Text="50%" Value="5" />
                            <telerik:ChartAxisItem TextBlock-Text="60%" Value="6" />
                            <telerik:ChartAxisItem TextBlock-Text="70%" Value="7" />
                            <telerik:ChartAxisItem TextBlock-Text="80%" Value="8" />
                        </Items>
                    </YAxis>
                    <Appearance Dimensions-Margins="8%, 6%, 8%, 6%">
                        <FillStyle FillType="Solid" MainColor="White" />
                        <Border Color="134, 134, 134" />
                    </Appearance>
                </PlotArea>
                <ChartTitle>
                    <Appearance Position-AlignedPosition="Top" Dimensions-Margins="1%, 1%, 1%, 1%" >
                        <FillStyle MainColor="">
                        </FillStyle>
                    </Appearance>
                    <TextBlock Text="Purchased Balance">
                        <Appearance TextProperties-Font="Tahoma, 13pt" />
                    </TextBlock>
                </ChartTitle>
            </telerik:RadChart>
        </telerik:RadAjaxPanel>
    </div>
</asp:Content>

Sayle
Top achievements
Rank 1
 answered on 13 Jun 2012
1 answer
243 views
I understand this is a relatively new product, but I'm running into a pretty odd issue with the chart not formatting decimal values from a Typed List into currency.

Here is what's on the front-end. Note, that for the DataFormatString in the Series' Label and Tooltip Appearance I've tried ${0}, {0:C}, ${0:0.00}, and a multitude of other options. However, it would show the entire decimal value (rather than rounding up on the last two digits) (see attached). What's interesting is that the Y-Axis label comes up perfectly fine.

This is what generates the data for the chart:

var qry = _ctx.VSalesRepCommissionGroupeds
    .Where(s => s.SurgeryDate.Value >= RadCommissionChartBeginOn)
    .OrderBy(s => s.SurgeryDate.Value)
    .Select(r => new
    {
        r.CommissionDue,
        SurgeryDate = r.SurgeryDate.Value.ToString("MMM yyyy")
    }).ToList();
 
radData = qry.GroupBy(r => r.SurgeryDate).Select(r => new RepCommissionChartData
{
    Commissions = r.Sum(x => x.CommissionDue),
    SurgeryDate = r.Key
}).ToList();


Now, if I change the line that generates the sum of CommissionDue to decimal.Round(r.Sum(x => x.CommissionDue), 2, MidpointRounding.AwayFromZero) it obviously rounds up the first two digits, but doesn't show a comma.

Shouldn't the front end format it using either of those formatting options or am I doing something wrong?
Marin Bratanov
Telerik team
 answered on 13 Jun 2012
1 answer
77 views
The series are constructed by the result of a sql. The X-axis has a period of time. The problem is that I have a number to one for Mastercard and Visa. series corresponding to the Visa, the first value in this query is regarding Jul/2011, but the X-axis starts at Jun/2011. What happens is that the plot of this chart, getting in Jun/2011 and not jul/2011. How do I assign the series to the query result?
Evgenia
Telerik team
 answered on 13 Jun 2012
1 answer
111 views

Hi, I’m currently experiencing a problem with the RadDataPager and the Dialog handlers.

My application has a RadListView control with a RadDataPager in the layout. In the RadDataPager, I’m using the Routing functionality. In the Application_Start I have the relevant registration as documented in the forums here.

The problem is, when I register routes it breaks the handlers for the Telerik Dialogs in the RadEditor and other such controls. I will post the code that I think is the source of the problem and where the problem arises.

the aspx file has this section:
<Telerik:RadListView ID="RadListView1" runat="server"
        DataSourceID="SqlSource"
        ItemPlaceholderID="ItemContainer"
        AllowPaging="True"
        InsertItemPosition="FirstItem"
        ClientIDMode="Static">
    <LayoutTemplate>
        <asp:PlaceHolder ID="ItemContainer" runat="server" />
        <Telerik:RadButton ID="InsertButton" runat="server"
                CssClass="InsertButton"
                Text="New Announcement"
                ButtonType="LinkButton"
                CommandName="InitInsert"
                Skin="CustomRad"
                EnableEmbeddedSkins="False"
                EnableAjaxSkinRendering="False"
                Visible='<%# Not Container.IsItemInserted %>'>
                    <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4" />
        </Telerik:RadButton>
 
        <Telerik:RadDataPager ID="RadDataPager1" runat="server"
                PagedControlID="RadListView1"
                PageSize="5"
                AllowSEOPaging="true"
                SEOPagingQueryPageKey="Page"
                    AllowRouting="true"
                    RouteName="AnouMain"
                    RoutePageIndexParameterName="Page">
            <Fields>
                <Telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                <Telerik:RadDataPagerButtonField FieldType="Numeric"
                        FirstButtonText="First"
                        LastButtonText="Last"
                        NextButtonText="Next"
                        PrevButtonText="Prev" />
                <Telerik:RadDataPagerButtonField FieldType="NextLast" />
            </Fields>
        </Telerik:RadDataPager>
    </LayoutTemplate>
         ... Templates omitted ...
</Telerik:RadListView>

the class i use for the registering of routes is:

Namespace SeoRouting
 
    ''' <summary>
    ''' Route Registering and other SEO Op functions and subs
    ''' </summary>
    ''' <remarks>TODO: Remarks to follow</remarks>
    Public Class Register
 
        Public Shared Sub Routes(ByVal Routes As System.Web.Routing.RouteCollection)
            Dim RouteValueDictionary As New System.Web.Routing.RouteValueDictionary()
            RouteValueDictionary.Add("Page", "1")
            Routes.MapPageRoute("AnouDefa", "en/Anou/{Page}", "~/en/Anou/Default.aspx", True, RouteValueDictionary)
            Routes.MapPageRoute("AnouMain", "announcements/Page{Page}", "~/en/Anou/Main.aspx", True, RouteValueDictionary)
        End Sub
 
    End Class
 
End Namespace

and the app start looks like this:

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        SeoRouting.Register.Routes(RouteTable.Routes)
End Sub

the web.config:

<httpHandlers>
    <!--<add verb="*" path="*.psd" type="System.Web.HttpForbiddenHandler" />-->
    <add path="ChartImage.axd"
         type="Telerik.Web.UI.ChartHttpHandler"
         verb="*" validate="false" />
    <add path="Telerik.Web.UI.SpellCheckHandler.axd"
         type="Telerik.Web.UI.SpellCheckHandler"
         verb="*" validate="false" />
    <add path="Telerik.Web.UI.DialogHandler.aspx"
         type="Telerik.Web.UI.DialogHandler"
         verb="*" validate="false" />
    <add path="Telerik.RadUploadProgressHandler.ashx"
         type="Telerik.Web.UI.RadUploadProgressHandler"
         verb="*" validate="false" />
    <add path="Telerik.Web.UI.WebResource.axd"
         type="Telerik.Web.UI.WebResource"
         verb="*" validate="false" />
</httpHandlers>
    <handlers>
        <remove name="ChartImage_axd" />
        <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
        <remove name="Telerik_Web_UI_DialogHandler_aspx" />
        <remove name="Telerik_RadUploadProgressHandler_ashx" />
        <remove name="Telerik_Web_UI_WebResource_axd" />
        <add name="ChartImage_axd" path="ChartImage.axd"
             type="Telerik.Web.UI.ChartHttpHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_Web_UI_SpellCheckHandler_axd"
             path="Telerik.Web.UI.SpellCheckHandler.axd"
             type="Telerik.Web.UI.SpellCheckHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_Web_UI_DialogHandler_aspx"
             path="Telerik.Web.UI.DialogHandler.aspx"
             type="Telerik.Web.UI.DialogHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_RadUploadProgressHandler_ashx"
             path="Telerik.RadUploadProgressHandler.ashx"
             type="Telerik.Web.UI.RadUploadProgressHandler"
             verb="*" preCondition="integratedMode" />
        <add name="Telerik_Web_UI_WebResource_axd"
             path="Telerik.Web.UI.WebResource.axd"
             type="Telerik.Web.UI.WebResource" verb="*"
             preCondition="integratedMode" />
    </handlers>
</system.webServer>

so to be clear, when i have the routing on in the App_Start the dialogs don’t function throwing an error saying that the handlers are
missing from the Web.config I reviewed This Telerik Document for help but couldn’t see the solution.


Kind Regards.
M Mason.

===========
Q1 2012
Win7-64
ASP.NET 4.0 VB

Pavlina
Telerik team
 answered on 13 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?