Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
306 views
I have this *mostly* working but I'm having trouble converting from the UI version.

I *was* using this.
<telerik:RadHtmlChart runat="server" ID="RiskLevelsChart" Height="400px" Width="400px" Transitions="true" RenderMode="Lightweight"
                                        Skin="Forest">
    <Appearance>
            <FillStyle BackgroundColor="White"></FillStyle>
    </Appearance>
    <ChartTitle>
            <Appearance Align="Center" BackgroundColor="White" Position="Top"></Appearance>
    </ChartTitle>
    <Legend>
            <Appearance BackgroundColor="White" Position="Right" Visible="true"></Appearance>
    </Legend>
    <PlotArea>
            <Appearance>
                <FillStyle BackgroundColor="White"></FillStyle>
            </Appearance>
            <Series>                                       
                <telerik:PieSeries StartAngle="90" dataFieldY="RiskLevelCount" NameField="RiskLevelName" Name="RiskLevelName" >                                      
                    <LabelsAppearance Position="Circle" DataFormatString="{0} %" DataField="RiskLevelName" ClientTemplate="#=dataItem.RiskLevelName# (#=dataItem.RiskLevelCount#)">
                    </LabelsAppearance>
                    <TooltipsAppearance ClientTemplate=" #=kendo.format(\'{0:P0}\', percentage)# " Visible="true" />
                </telerik:PieSeries>
            </Series>
    </PlotArea>
</telerik:RadHtmlChart>

I've now switched to doing it from the code behind, but I'm having trouble using the ClientTemplate Feature, as well as the Kendo.

            <telerik:RadHtmlChart runat="server" ID="RiskLevelsChart" Height="400px" Width="400px" Transitions="true" RenderMode="Lightweight"
                                                    Skin="Forest">
                <Appearance>
                        <FillStyle BackgroundColor="White"></FillStyle>
                </Appearance>
                <ChartTitle>
                        <Appearance Align="Center" BackgroundColor="White" Position="Top"></Appearance>
                </ChartTitle>
                <Legend>
                        <Appearance BackgroundColor="White" Position="Right" Visible="true"></Appearance>
                </Legend>
                <PlotArea>
                        <Appearance>
                            <FillStyle BackgroundColor="White"></FillStyle>
                        </Appearance>
<%--                        <Series>                                       
                            <telerik:PieSeries StartAngle="90" dataFieldY="RiskLevelCount" NameField="RiskLevelName" Name="RiskLevelName" >                                      
                                <LabelsAppearance Position="Circle" DataFormatString="{0} %" DataField="RiskLevelName" ClientTemplate="#=dataItem.RiskLevelName# (#=dataItem.RiskLevelCount#)">
                                </LabelsAppearance>
                                <TooltipsAppearance ClientTemplate=" #=kendo.format(\'{0:P0}\', percentage)# " Visible="true" />
                            </telerik:PieSeries>
                        </Series>--%>
                </PlotArea>
            </telerik:RadHtmlChart>
Dim query = From r In Assessment
Dim HighQuery = Assessment.Where(Function(x) x.RiskLevel = 3).Count
Dim MediumQuery = Assessment.Where(Function(x) x.RiskLevel = 2).Count
Dim LowQuery = Assessment.Where(Function(x) x.RiskLevel = 1).Count
 
Dim risklevels As New List(Of RiskLevel)()
risklevels.Add(New RiskLevel(Master.GetTranslation("Low").ToString, LowQuery, System.Drawing.ColorTranslator.FromHtml("#9BFF00")))
risklevels.Add(New RiskLevel(Master.GetTranslation("Medium").ToString, MediumQuery, System.Drawing.ColorTranslator.FromHtml("#FFE300")))
risklevels.Add(New RiskLevel(Master.GetTranslation("High").ToString, HighQuery, System.Drawing.ColorTranslator.FromHtml("#FF6300")))
 
RiskLevelsChart.ChartTitle.Text = Master.GetTranslation("RiskLevels").ToString
 
Dim chartData As New PieSeries
chartData.StartAngle = "90"
chartData.LabelsAppearance.Position = HtmlChart.PieLabelsPosition.Circle
chartData.LabelsAppearance.DataFormatString = "{0}"
chartData.TooltipsAppearance.DataFormatString = "{0} %"
 
For Each value As RiskLevel In risklevels
 
    Dim item As New SeriesItem
 
    item.Name = value.RiskLevelName
    item.YValue = value.RiskLevelCount
    item.BackgroundColor = value.RiskLevelColor
    chartData.Items.Add(item)
 
Next
 
 
RiskLevelsChart.PlotArea.Series.Add(chartData)
Tim
Top achievements
Rank 1
 answered on 23 May 2013
4 answers
305 views
Window is losing its Behaviors, and Width and Height properties
The window opens with a small size, and all extra buttons, maximize, minimize, etc, which I don't need. I only need the Close button.

Here's the ascx code:

<telerik:RadWindowManager ID="RadWindowManagerRepPayments" ShowContentDuringLoad="false" VisibleStatusbar="false"
    ReloadOnShow="true" runat="server" EnableShadow="true" Width="1500px" Height="500px">
    <Windows>
        <telerik:RadWindow ID="wndRepPaymentsEdit" runat="server" Behaviors="Close" OnClientClose="OnClientCloseRepPayments"
            Width="1500px" Height="500px" Title="Payment" NavigateUrl="RepPaymentsEdit.aspx">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

Here's the javascript for opening:

var oWnd = radopen("RepPaymentsEdit.aspx" + "?RepID=" + repID + "&RepPaymentsID=" + id, "wndRepPaymentsEdit");


Also, if I change the window size, and open it again, it resizes it. I don't want resizing. I just want to be able to open and close it with a specific size.
Lena
Top achievements
Rank 1
 answered on 23 May 2013
4 answers
242 views

Hello, I have the below working perfectly, however, I need to be able to change the Slice colors based on the Data..

i.e., The High slice should be red, Medium Yellow and Low Green.  I can't seem to figure out that piece..

<telerik:RadHtmlChart runat="server" ID="RiskLevelsChart" Height="400px" Width="400px" Transitions="true" RenderMode="Lightweight"
                                        Skin="Forest">
    <Appearance>
            <FillStyle BackgroundColor="White"></FillStyle>
    </Appearance>
    <ChartTitle>
            <Appearance Align="Center" BackgroundColor="White" Position="Top"></Appearance>
    </ChartTitle>
    <Legend>
            <Appearance BackgroundColor="White" Position="Right" Visible="true"></Appearance>
    </Legend>
    <PlotArea>
            <Appearance>
                <FillStyle BackgroundColor="White"></FillStyle>
            </Appearance>
            <Series>                                       
                <telerik:PieSeries StartAngle="90" dataFieldY="RiskLevelCount" NameField="RiskLevelName" Name="RiskLevelName">                                      
                    <LabelsAppearance Position="Circle" DataFormatString="{0} %" DataField="RiskLevelName" ClientTemplate="#=dataItem.RiskLevelName# (#=dataItem.RiskLevelCount#)">
                    </LabelsAppearance>
                    <TooltipsAppearance ClientTemplate=" #=kendo.format(\'{0:P0}\', percentage)# " Visible="true" />
                </telerik:PieSeries>
            </Series>
    </PlotArea>
</telerik:RadHtmlChart>

Private Sub DoChart1(ByVal Assessment As List(Of ExtendedRiskAssessment))
 
    Dim query = From r In Assessment
    Dim HighQuery = Assessment.Where(Function(x) x.RiskLevel = 3).Count
    Dim MediumQuery = Assessment.Where(Function(x) x.RiskLevel = 2).Count
    Dim LowQuery = Assessment.Where(Function(x) x.RiskLevel = 1).Count
 
    Dim risklevels As New List(Of RiskLevel)()
    risklevels.Add(New RiskLevel(Master.GetTranslation("High").ToString, HighQuery, Color.Red))
    risklevels.Add(New RiskLevel(Master.GetTranslation("Medium").ToString, MediumQuery, Color.Yellow))
    risklevels.Add(New RiskLevel(Master.GetTranslation("Low").ToString, LowQuery, Color.Green))
 
 
    RiskLevelsChart.ChartTitle.Text = Master.GetTranslation("RiskLevels").ToString
 
 
    RiskLevelsChart.DataSource = risklevels
    RiskLevelsChart.DataBind()
 
End Sub
Tim
Top achievements
Rank 1
 answered on 23 May 2013
4 answers
153 views
HI,
   I have aggergate problem on one of the column Total_goal of the data source. If remove the aggergate then no exception.
   What is the reason for this behaviour? Clearly Total_Goal Column is the part of data source.

<telerik:GridTemplateColumn Aggregate="Sum" DataField="Total_Goal" UniqueName="TotalGoals" ItemStyle-Width="75px" HeaderStyle-Font-Bold="true" FooterAggregateFormatString="{0:F2}" FooterStyle-Font-Bold="true" >
                                            <HeaderTemplate>
                                                Total Goal
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <a href="HinoPartsDashBoardTransactions.aspx?SalesType=AM&amp;from= <%#ddlStartMonth.SelectedValue%>&amp;to=<%#ddlEndMonth.SelectedValue%>&amp;DMP= <%#Eval("User_ID")%>"><%#Eval("Total_Goal")%></a>
                                             </ItemTemplate>
                                                            
                                         </telerik:GridTemplateColumn>

Total_Goal     Total_sales
0.00                123.67
0.00                4567.89




Error:

Server Error in '/HinoParts3' Application.

Cannot find column -1.

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.IndexOutOfRangeException: Cannot find column -1.

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:

[IndexOutOfRangeException: Cannot find column -1.]
   System.Data.DataColumnCollection.get_Item(Int32 index) +92
   Telerik.Web.UI.GridDataTableFromEnumerable.GetColumnsToUse() +7894
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1055
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +55
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +40
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +31
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, DataView dataView, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +222
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +96
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +478
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +219
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +73
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +351
   Telerik.Web.UI.RadGrid.DataBind() +165
   Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +3869
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +177
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Balkar
Top achievements
Rank 1
 answered on 23 May 2013
3 answers
88 views
Hi Telerik team and community

I've got a little  question. I use the fileexplorer control but I've hidden the original toolbar and I use a personnal toolbar. So, I've to custom all handler to call functionnality (new dir, gridview etc ... )

Here is my question, How I can call the dialog upload window with a personal button ? I hope my question is understandable

Thanks

Romain




Romain
Top achievements
Rank 1
 answered on 23 May 2013
2 answers
92 views
Hello, I'm new to using the Telerik controls and I haven't had any luck finding an answer to my problem so far.  All I'm trying to do is have a different background image for un-selected menu items, selected menu items and hovered menu items.  So far I've been able to apply this style to all menu items except for the very first one.  I'm not doing any thing different in my code, so I'm wondering if I should be doing something different.  In my attached picture, you can see the first menu item (selected) without my background image.  The second item has the correct selected style, the third item has the correct un-selected style and the final item has the correct hover style.  If it makes any difference, this control is on a master page.

CSS
.NormalMenuItem
{
    /*background-color: red !important;*/
    background-image: url(../Images/headerNormal.png) !important;
    background-size: 100% 35px;
}
 
.NormalMenuItem:hover
{
    /*color: red !important;
    background-color: white !important;*/
    background-image: url(../Images/headerHover.png) !important;
    background-size: 100% 35px;
}
 
.SelectedMenuItem
{
    /*background-color: purple !important;*/
    background-image: url(../Images/headerActive.png) !important;
    background-size: 100% 35px;
}

C#
DataTable mnuDT = new DataTable();
mnuDT.Columns.Add("Section");
mnuDT.Rows.Add("Employees");
mnuDT.Rows.Add("Projects");
mnuDT.Rows.Add("Customers");
 
Telerik.Web.UI.RadMenuItem homeRmi = new Telerik.Web.UI.RadMenuItem();
homeRmi.Text = "Home";
homeRmi.CssClass = "NormalMenuItem";
homeRmi.ClickedCssClass = "SelectedMenuItem";
homeRmi.SelectedCssClass = "SelectedMenuItem";
homeRmi.Selected = true;
rmMain.Items.Add(homeRmi);
 
for(int i = 0; i < mnuDT.Rows.Count; i++)
{
    Telerik.Web.UI.RadMenuItem rmi = new Telerik.Web.UI.RadMenuItem();
    rmi.Text = mnuDT.Rows[i].ItemArray[0].ToString();
    rmi.CssClass = "NormalMenuItem";
    rmi.ClickedCssClass = "SelectedMenuItem";
    rmi.SelectedCssClass = "SelectedMenuItem";
    rmMain.Items.Add(rmi);
}

ASPX
<telerik:RadMenu ID="rmMain" runat="server" onitemclick="rmMain_ItemClick">
</telerik:RadMenu>
Athena
Top achievements
Rank 1
 answered on 23 May 2013
2 answers
498 views
After upgrading I get Failed to create designer 'Telerik.Web..... on all Telerik controls.

The only way I can get the controls to work is to down grade them.  What do I need to do to get them to work?

Using Telerik version 2011.1.519.35
only working version looks like 2010.1.519.35 located in the installation folder all other version are in the Download folder. 
Using VS2010 Prem, Windows 7 Ent. all service packs installed and up to date.

Thanks.
Roberto Monge Fernández
Top achievements
Rank 2
 answered on 23 May 2013
3 answers
174 views
Hi

I'm using a RadAlert from the server side to pop up if there is an issue. I'm using the RadAlert because it gives me 1 button, if it pops up I want the OK click to stop processing the serverside event.

How can I achieve this.

Or if I have to use RadConfirm how do I hide the Close button.

Andy
Andy Green
Top achievements
Rank 2
 answered on 23 May 2013
1 answer
146 views
How do I set a comma as the tag separator?  It seems my tags are being separated by space, but our tags can contain separator words.  For example "Santa Monica,Public Library" is displayed as 4 tags instead of just 2.

Is there something I'm missing here?  Seems like this should be the default behavior.

Thanks for your time.

Slav
Telerik team
 answered on 23 May 2013
3 answers
202 views
Hi! Is there a simple way to align the icon vertically via CSS? (See attached.) Thanks!
Marin Bratanov
Telerik team
 answered on 23 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?