Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
120 views
Hi Telerik Team
I am working on telerik asp.net scheduler.
When the resources(Left side in scheduler) is more than or equal to 65 it is giving error.
ERROR:
Specified argument was out of the range of valid values.
I already posted comment related to this in (http://feedback.telerik.com/Project/108/Feedback/Details/117889-specified-argument-was-out-of-the-range-of-valid-values) at 13 March 2015, 11:35.
Please find attached files from the above link.

Regards,
Tarun
Boyan Dimitrov
Telerik team
 answered on 20 Mar 2015
2 answers
69 views
Hi,
I have a RadEditor with StripFormattingOptions="AllExceptNewLines". Once the editor is loaded, if the user does a mouse-click followed by CTRL+V to paste html content, the html formatting is stripped successfully ONLY if there is a certain amount of time space between mouse-click and CTRL+V.
If the time gap is less, the following javascript exception is thrown and the formatting is not stripped.

Line: 2313
Error: 'parentNode' is null or not an object


We have users who do a quick Mouse+Click followed by CTRL+V and hence we see this bug quite often.
Please let me know if you have a workaround for this.
Any help is appreciated.

Thanks
Sangeetha
Ianko
Telerik team
 answered on 20 Mar 2015
1 answer
123 views
When a certain combination of html is pasted into a RadEditor on our site, the webpage freezes and eventually we get the Long Running Script error.

The text I am test is nothing too strange:

For registration information Alicia Pierre Louis at <a href="mailto:asearles@misd.net">asearles@misd.net</a>.&nbsp; Join us for one more day of professional learning experience of bringing the Common Core Reading Standards to your K-2 classroom.&nbsp; We will take a look at the "brand new" MAISA Reading Units K-2. We will also include a half day session of leveled texts.

If I shorten it to the following, I don't get the error:

at <a href="mailto:asearles@misd.net">asearles@misd.net</a>.&nbsp; Join us for one more day of professional learning experience of bringing the Common Core Reading Standards to your K-2 classroom.&nbsp; We will take a look at the "brand new" MAISA Reading 

If I don't have both a mailto link and the double quotes, I don't get the error.

I was able to reproduce the problem in some sample code I found at http://www.telerik.com/forums/paste-plain-text-pop-up-causes-you-to-jump-to-the-top-of-the-page.

I'm using version 2014.3.1024.35.



Ianko
Telerik team
 answered on 20 Mar 2015
1 answer
131 views
So we have this RadGrid, it cannot be paged and appears unfiltered.  In some cases there are upwards of 1000 rows and in other cases upwards of 3000 rows.

In IE8 it causes the "Long running script, do you want to stop running scripts" message.

The only reason this grid is used here is because it is standard grid being used in the application, but it's use is minimal, some sorting and and a separate filter that retrieves the data again anyway.

So is there anything the grid may be doing that I can switch off to make it faster and less intensive?  I know nothing about Telerik controls or RadGrids?
Maria Ilieva
Telerik team
 answered on 20 Mar 2015
3 answers
102 views
The load on demand feature works well based on examples when using the standard combobox.items.add
How do we achieve the same when we are working with custom templates?

An example for Load on Demand with custom templates would be much appreciated.

Thank you.
Dimitar Terziev
Telerik team
 answered on 20 Mar 2015
4 answers
122 views
I have a RadTreeView which has parent nodes which can be expanded to show its child nodes. These child nodes should then be able to be selected using checkboxes, but the parent nodes shouldn't. My issue is an accessibility one, as I wish to have the checkboxes associated with their text through a label, but the RadTreeView uses a <span> tag. The child nodes are populated when the parent node is expanded via the RadTreeView1_NodeExpand() method.

I believe the issue revolves around the parent/child situation as when creating a RadTreeView previously with no child nodes and a DataBind() I was able to declare a <NodeTemplate> which used checkboxes/labels, however this template does not seem to be used when adding the nodes via code behind using the Add() method with parents and children.

Is there a way I can add child nodes that adhere to a template I specify?

Here is my code, I have attached screenshots as well showing the association errors via WAVE.

No parent/children aspx:
<telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Skin_Telerik"
            CheckBoxes="false" MultipleSelect="true" SingleExpandPath="False"
            DataTextField="IDWithTitle" EnableEmbeddedSkins="false" DataFieldID="CategoryID"
            DataValueField="CategoryID" OnClientNodeClicked="ClientNodeClicked" Style="font-size:medium; white-space: normal;">
            <NodeTemplate>
                <asp:CheckBox runat="server" id="chkCategory" CssClass="rtChk" 
            Text='<%# String.Format("{0}: {1}", DataBinder.Eval(Container.DataItem, "CategoryID"), DataBinder.Eval(Container.DataItem, "Title")) %>' />
                <asp:HiddenField runat="server" ID="categoryID" Value='<%#DataBinder.Eval(Container.DataItem, "CategoryID")%>' />
            </NodeTemplate>
</telerik:RadTreeView>

No parent/children VB:
    RadTreeView1.DataSource = oList
    RadTreeView1.DataBind()


Parent/children aspx: 
<telerik:radtreeview id="RadTreeView1" AccessKey="M" TabIndex="1" runat="server" skin="Skin_Telerik" checkboxes="true"
                    multipleselect="true" singleexpandpath="False" datatextfield="Title" da enableembeddedskins="false"  
                    datafieldid="ID" datafieldparentid="ParentId" datavaluefield="ID" onclientnodeclicked="ClientNodeClicked" 
                    onnodeexpand="RadTreeView1_NodeExpand" Style="white-space: normal;" CheckChildNodes="true" Font-Size="Medium"/>

Parent/children VB:


Any help would be much appreciated!

Alan
Nencho
Telerik team
 answered on 20 Mar 2015
7 answers
151 views
Hi,
does anyone know where I can get a download of the latest RadControls that support .net 2.0? I believe it is the 2010 Q4 release, but the Telerik ControlPanel does not go back that far.

Thanks!
Michael
Marin Bratanov
Telerik team
 answered on 20 Mar 2015
4 answers
102 views
Hi,

I have a scenario in which I have a HtmlChart and upon a series click, i catch client side series click event and make a ajax request to update a rad grid. 
I am receving the ajax request and binding the radgrid, but grid on client side is not updating. 

Below is the code snippet:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ChickenpoxSLA.aspx.cs" Inherits="Microsoft.Azure.Documents.Dashboard.Reports.Availability.ChickenpoxSLA" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="../../Scripts/Reports.js"></script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ChickenpoxChart">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ChickenpoxChart" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="AccountsAvailability" LoadingPanelID="LoadingPanel1" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="AccountsAvailability">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ChickenpoxChart" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="AccountsIncidents" LoadingPanelID="LoadingPanel1" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" Skin="Default" runat="server">
    </telerik:RadAjaxLoadingPanel>
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function getAjaxManager() {
                return $find("<%=RadAjaxManager1.ClientID%>");
            }
        </script>
    </telerik:RadCodeBlock>
    <div class="row">
        <div class="col-lg-2">
            <div id="sidebar">
                <ul class="nav list-group">
                    <li>
                        <a class="list-group-item" href="ChickenpoxSLA.aspx"><i class="icon-home icon-1x"></i>Chickenpox SLA</a>
                    </li>
                    <li>
                        <a class="list-group-item" href="#"><i class="icon-home icon-1x"></i>Internal Customers Availability</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="col-lg-10">
             <div class="row">
                <div class="col-lg-12">
                    <div class="panel-group" id="accordion">
                      <div class="panel panel-default">
                        <div class="panel-heading">
                          <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
                              Availability SLA properties
                            </a>
                          </h4>
                        </div>
                        <div id="collapseOne" class="panel-collapse collapse in">
                          <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-2">
                                   <asp:Label runat="server" Font-Bold="true" Text="Time Range"></asp:Label>
                                   <telerik:RadDropDownList runat="server" ID="AvailabilityTime" TabIndex="1" Width="200" DropDownWidth="200" DefaultMessage="Select Availability Time Range ..."
                                        AutoPostBack="true" OnSelectedIndexChanged="AvailabilityTime_SelectedIndexChanged">
                                        <Items>
                                            <telerik:DropDownListItem Text="Hourly" Selected="true"/>
                                            <telerik:DropDownListItem Text="Daily" />
                                            <telerik:DropDownListItem Text="Weekly" />
                                        </Items>
                                   </telerik:RadDropDownList>
                                </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                </div>
            </div>
             <div class="row">
                <div class="col-lg-8">
                    <telerik:RadHtmlChart runat="server" ID="ChickenpoxChart" Height="600px" OnClientSeriesClicked="OnChickenpoxChartClicked">
                        <PlotArea>
                            <Series>
                            </Series>
                            <XAxis>
                            </XAxis>
                            <YAxis>
                            </YAxis>
                        </PlotArea>
                        <ChartTitle Text="Chickenpox SLA">
                        </ChartTitle>
                    </telerik:RadHtmlChart>
                </div>
             </div>
             <br />
             <br />
             <div class="row">
                <div class="col-lg-6">
                    <label for="AccountsAvailability">Accounts Violating SLA</label>
                    <br />
                    <telerik:RadGrid ID="AccountsAvailability" AllowPaging="false" runat="server" GridLines="None" AllowSorting="false" EnableViewState="false">
                        <ClientSettings AllowKeyboardNavigation="false" EnablePostBackOnRowClick="true">
                            <Selecting AllowRowSelect="true"></Selecting>
                        </ClientSettings>
                    </telerik:RadGrid>
                    <br />
                </div>
                <div class="col-lg-6">
                    <label for="AccountsIncidents">Incidents for the Impacted Account</label>
                    <br />
                    <telerik:RadGrid ID="AccountsIncidents" AllowPaging="false" runat="server" GridLines="None" AllowSorting="true" OnNeedDataSource="AccountsIncidents_NeedDataSource"
                        OnItemCommand="AccountsIncidents_ItemCommand">
                        <ClientSettings AllowKeyboardNavigation="false" EnablePostBackOnRowClick="true">
                            <Selecting AllowRowSelect="true"></Selecting>
                        </ClientSettings>
                    </telerik:RadGrid>
                    <br />
                </div>
             </div>
        </div>
    </div>
</asp:Content>

(function (global, undefined) {
    global.OnChickenpoxChartClicked = function (sender, args) {
        var ajaxManager = global.getAjaxManager();

        if (args.get_seriesName() !== "Months") {
            ajaxManager.ajaxRequest(args.get_category());
        }
    }
})(window);

using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Charting;
using Telerik.Web.UI;

namespace Microsoft.Azure.Documents.Dashboard.Reports.Availability
{
    enum ChickenpoxSLAType
    {
        Hourly,
        Daily,
        Weekly
    }
    public partial class ChickenpoxSLA : System.Web.UI.Page
    {
        string environment;
        DateTime accountAvailabilityTime;

        protected void Page_Load(object sender, EventArgs e)
        {
            RadDropDownList list = (RadDropDownList)Master.FindControl("GlobalEnvironment");
            this.environment = list.SelectedValue;

            if(!IsPostBack)
            {
                this.AccountsAvailability.DataSource = new string[] { };
                this.AccountsAvailability.DataBind();
                this.AccountsIncidents.DataSource = new string[] { };
                this.AccountsIncidents.DataBind();
            }
            UpdateChart(ChickenpoxSLAType.Hourly);
        }

        private void UpdateChart(ChickenpoxSLAType slaType)
        {
            DataTable table = null;

            switch(slaType)
            {
                case ChickenpoxSLAType.Hourly:
                    table = SiteGlobal.Repository[this.environment].GetChickenpoxSLA1H(DateTime.Now.AddDays(-1), DateTime.Now);
                    ChickenpoxChart.PlotArea.XAxis.DataLabelsField = "Time";
                    break;
                case ChickenpoxSLAType.Daily:
                    table = SiteGlobal.Repository[this.environment].GetChickenpoxSLA1D(DateTime.Now.AddDays(-15), DateTime.Now);
                    ChickenpoxChart.PlotArea.XAxis.DataLabelsField = "Date";
                    break;
                //case ChickenpoxSLAType.Weekly:
                //    table = SiteGlobal.Repository[this.environment].GetChickenpoxSLAWeekly(DateTime.Now.AddDays(-1), DateTime.Now);
                //    break;
                default:
                    table = SiteGlobal.Repository[this.environment].GetChickenpoxSLA1H(DateTime.Now.AddDays(-1), DateTime.Now);
                    ChickenpoxChart.PlotArea.XAxis.DataLabelsField = "Time";
                    break;
            }

            ChickenpoxChart.PlotArea.XAxis.MajorGridLines.Visible = false;
            ChickenpoxChart.PlotArea.XAxis.MinorGridLines.Visible = false;
            ChickenpoxChart.PlotArea.YAxis.MajorGridLines.Visible = false;
            ChickenpoxChart.PlotArea.YAxis.MinorGridLines.Visible = false;
            
            //ChickenpoxChart.PlotArea.YAxis.MinValue = 0;

            AxisY additionYAxis = new AxisY();
            additionYAxis.Name = "SLAVioloationsAxis";
            additionYAxis.MinValue = 0;
            additionYAxis.MaxValue = 25;
            additionYAxis.Visible = false;
            ChickenpoxChart.PlotArea.AdditionalYAxes.Add(additionYAxis);
            ChickenpoxChart.PlotArea.XAxis.AxisCrossingPoints.Add(0);
            ChickenpoxChart.PlotArea.XAxis.AxisCrossingPoints.Add(20);

            ColumnSeries totalAccountSeries = new ColumnSeries();
            totalAccountSeries.Name = "Total Accounts";
            totalAccountSeries.DataFieldY = "TotalAccounts";
            totalAccountSeries.TooltipsAppearance.DataFormatString = "{0}";
            
            LineSeries slaViolationSeries = new LineSeries();
            slaViolationSeries.AxisName = "SLAVioloationsAxis";
            slaViolationSeries.Name = "SLA Violations";
            slaViolationSeries.DataFieldY = "SLAViolations";
            slaViolationSeries.TooltipsAppearance.DataFormatString = "{0}";
            slaViolationSeries.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.Black;
            
            ChickenpoxChart.PlotArea.Series.Add(totalAccountSeries);
            ChickenpoxChart.PlotArea.Series.Add(slaViolationSeries);

            ChickenpoxChart.DataSource = table;
            ChickenpoxChart.DataBind();
        }

        protected void AvailabilityTime_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e)
        {
            ChickenpoxChart.PlotArea.Series.Clear();
            ChickenpoxChart.PlotArea.XAxis.Items.Clear();
            ChickenpoxChart.PlotArea.AdditionalYAxes.Clear();

            ChickenpoxSLAType slaType = (ChickenpoxSLAType)Enum.Parse(typeof(ChickenpoxSLAType), AvailabilityTime.SelectedText);
            UpdateChart(slaType);
        }

        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            string seriesName = ChickenpoxChart.PlotArea.Series[0].Name;
            string ShortFormat = "ddd MMM d yyyy HH:mm:ss";
            string[] Formats = { ShortFormat };
            string dateTobeParsed1 = e.Argument.Substring(0, e.Argument.IndexOf('G') - 1);
            accountAvailabilityTime = DateTime.ParseExact(dateTobeParsed1, Formats, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal).ToUniversalTime();

            AccountsAvailability.DataSource = SiteGlobal.Repository[this.environment].GetAccountAvailability1H(Convert.ToDateTime("2015-03-11 16:00:00.000"));
            AccountsAvailability.Rebind();
        }

        protected void AccountsIncidents_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {

        }

        protected void AccountsIncidents_ItemCommand(object sender, GridCommandEventArgs e)
        {

        }
    }
}

Appreciate in any help here.

Thanks
Satish
Satish Kumar
Top achievements
Rank 1
 answered on 20 Mar 2015
8 answers
443 views
 hi 
i have grid in batch mode and a button . in button i want delete selected row in grid in client side without send request to server and post back page.
what should i do?
thank you
LACDA-IT
Top achievements
Rank 1
 answered on 19 Mar 2015
0 answers
108 views
On several occasions I have had the need to send specific information to sub controls or Custom Edit forms when using Rad Grids.  I have seen in the forums that others have had this same issue.  However I have not seen any solutions to this issue. I have come up with two solutions that seem to work well.

------------------------------------------------------------------------
The first solution is the use of Attributes:

From the RsdGrid.ItemCommand handlerFor example I need to pass an ID to the edit form so that It knows what data to present. I also use multiple edit forms depending on the insert button selected. 

Case Telerik.Web.UI.RadGrid.InitInsertCommandName

               e.Canceled = True

               RDG_List.EditIndexes.Clear()

               Me.Attributes.Add("CompanyID", CompanyID.ToString)

                e.Item.OwnerTableView.EditFormSettings.UserControlName = GT.Constant.Screen.GTCS0958_Security.ScreenCommonName

               e.Item.OwnerTableView.InsertItem()

 

 

In the Page load of the
web user control for the edit form I do the following:

 

If ChildControlsCreated = False Then

 If (TypeOf DataBinder.Eval(Parent.BindingContainer,"DataItem.RowID") Is System.DBNull) Then        
' in insert mode        
CompanyID = CLng(CType(Parent.TemplateControl, System.Web.UI.UserControl).Attributes("CompanyID"))

 
End if
End if

 

Note: You may have to
play with the parent pointer till you find you original control because the
parent is sometimes a grid table value not the original control.

 

 --------------------------------------------------------------------------------------------

The Second solution is adding columns to the table:

This method only works if you are editing a row that exists in the table. For an insert you do not pass any Parent.BindingContainer data so it will not work, hence the need for the first method. In my work I use data tables. In this case I want to pass a flag that tells the control to show different entry fields. When you press the edit row button on the grid it kicks off the needdatasource function prior to opening the custom edit form.

In the
RadGrid.NeedDataSource  handler

Dim DataTable As System.Data.DataTable 
-- call some function to get the data into the datatable

DataTable.Columns.Add("ShowMemberRelationshipInfo", System.Type.GetType("System.Boolean")) 

Dim v As Boolean = ShowMemberRelationshipInfo

For Each r In DataTable.Rows   
r("ShowMemberRelationshipInfo") = v

Next 

RadGrid.DataSource = DataTable   

In the Custom Edit Form simply read the data as you do normally in the page load.  

ShowMemberRelationshipInfo = CBool(DataBinder.Eval(Parent.BindingContainer, "DataItem.ShowMemberRelationshipInfo")) 

 
Rich
Top achievements
Rank 1
 asked on 19 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?