Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
123 views

Hi I’ve got the problem with the radcalendar please see the attached as that shows you what i'm looking to produce.

 

This is the aspx;

<%@ Page Title="" Language="C#" MasterPageFile="~/App_Templates/Local/ConfigLayoutContainer.master" AutoEventWireup="true" CodeBehind="OnCall.aspx.cs" Inherits="ConfigurationModule.rota.OnCall" %>
<%@ Register TagPrefix="user" Namespace="TESTones.Web.UI.Telerik" Assembly="TESTones.Web.UI" %>
 
<asp:Content ID="Header" ContentPlaceHolderID="InstanceHeader" runat="server">
    <title>TESTones | Configuration Module | Manage Overtime</title>
    <link href="/styles/global.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .rcWeekend {
            background-color: #2291a1 !important;
        }
         
        .rcDisabled
        {
            background-color: #fb1f33 !important;
            border: 1px solid #fb1f33 !important;
            background-repeat: no-repeat;
            background-position: 5px 5px !important;
        }
    </style>
</asp:Content>
 
<asp:Content ID="Page" ContentPlaceHolderID="InstanceContent" runat="server">
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" Width="800" Height="600" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSave">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="JustOnePanel" LoadingPanelID="LoadPanel1"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadAjaxLoadingPanel ID="LoadPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
 
<telerik:RadToolBar ID="RadToolBar1" runat="server" CssClass="PageMenu">
    <Items>
        <telerik:RadToolBarButton Value="Name" runat="server">
            <ItemTemplate>
                <h1>
                    <asp:Label ID="Label4" runat="server" Text="Manage On Call" /></h1>
            </ItemTemplate>
        </telerik:RadToolBarButton>
    </Items>
</telerik:RadToolBar>
     
 
    <div class="Form">
        <div class="ContentLeft" style="width: 200px;">
            <p>
                <asp:Label ID="lblEngineer" CssClass="formLabel" Text="Engineer" runat="server" />
                <telerik:RadComboBox ID="ddlEngineer"
                    runat="server" AppendDataBoundItems="true" AutoPostBack="True" Filter="Contains" EmptyMessage="Please Select..." CssClass="SearchFormDropdown" EnableLoadOnDemand="True"
                                     OnSelectedIndexChanged="ddlEngineer_SelectedIndexChanged"/>
            </p>
        </div>
        <div>
            <telerik:RadCalendar Width="350px" Height="200px" ID="RadCalendar1" runat="server" EnableMultiSelect="True" AutoPostBack="True" CultureInfo="en-GB"
                                  OnSelectionChanged="RadCalendar1_SelectionChanged">
                <WeekendDayStyle CssClass="rcWeekend" />
                <CalendarTableStyle CssClass="rcMainTable" />
                <OtherMonthDayStyle CssClass="DayStyle" />
                <OutOfRangeDayStyle CssClass="rcOutOfRange" />
                <DisabledDayStyle CssClass="rcDisabled" />
                <SelectedDayStyle CssClass="rcSelected" />
                <DayOverStyle CssClass="rcHover" />
                <FastNavigationStyle CssClass="RadCalendarMonthView RadCalendarMonthView_WebBlue" />
                <ViewSelectorStyle CssClass="rcViewSel" />
                <DayStyle CssClass="DayStyle" />
            </telerik:RadCalendar>
        </div>
         
        <telerik:RadAjaxPanel ID="JustOnePanel" runat="server">
 
            <div class="ContentRight">
                <p>
                    <div style="margin-top: 34px; margin-left: 15px;">
                        <telerik:RadButton  runat="server" ID="btnSave" Text="Save On Call Selection" OnClick="btnSaveChanges_Click" >
                            <Icon PrimaryIconLeft="5px" PrimaryIconTop="2px" PrimaryIconUrl="../images/icons/tick.png"  />
                        </telerik:RadButton>
                        <asp:Label ID="lblSaved" CssClass="formLabel" Text="Saved" ForeColor="green" runat="server" />
                    </div>
                </p>
            </div>
 
        </telerik:RadAjaxPanel>
    </div>
</asp:Content>

 

and this is the cs;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using Ninject;
using Test.Core.Sevices;
using Telerik.Web.UI;
using Telerik.Web.UI.Calendar;
 
namespace ConfigurationModule.rota
{
    public partial class OnCall : Page
    {
        #region Dependency declarations
        [Inject]
        public IResourceService svcResourceService { get; set; }
        [Inject]
        public ICheapSingleUserStorageService svcUser { get; set; }
        #endregion
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblSaved.Visible = false;
                BindEngineersDropDown();
                SetUpCalendar();
            }
        }
 
        protected void BindEngineersDropDown()
        {
            ddlEngineer.DataSource = svcResourceService.ListByContracts(svcUser.Get().ContractCollection().ToList());
            ddlEngineer.DataBind();
        }
 
        protected void ddlEngineer_SelectedIndexChanged(object sender, EventArgs e)
        {
            lblSaved.Visible = false;
            SetUpCalendar();
        }
 
 
        protected void RadCalendar1_SelectionChanged(object sender, SelectedDatesEventArgs e)
        {
            lblSaved.Visible = false;
        }
 
 
        protected void SetUpCalendar()
        {
            RadCalendar1.RangeMinDate = DateTime.Today;
            RadCalendar1.SpecialDays.Clear();
            RadCalendar1.SelectedDates.Clear();
 
            var onCallList = svcResourceService.GetOnCallList(ddlEngineer.SelectedValue).ToList();
 
            foreach (var rotaOverride in onCallList)
            {
                var calendarDay = new RadCalendarDay { Date = rotaOverride.Date };
 
                 
                if (rotaOverride.TypeId == 2)
                {
                    calendarDay.ItemStyle.CssClass = "rcSelected2";
                    calendarDay.IsSelectable = false;
                    RadCalendar1.SpecialDays.Add(calendarDay);
                }
                else
                {
                    RadCalendar1.SelectedDates.Add(new RadDate(rotaOverride.Date));
                }
 
                 
            }
        }
 
        protected void btnSaveChanges_Click(object sender, EventArgs e)
        {
            List<DateTime> dates = new List<DateTime>();
 
            foreach (RadDate date in RadCalendar1.SelectedDates)
            {
                var d = date.Date;
                dates.Add(d);
            }
 
            svcResourceService.UpdateOnCallList(dates, ddlEngineer.SelectedValue.ToString());
            lblSaved.Visible = true;
        }
 
    }
}

Martin
Top achievements
Rank 1
 answered on 10 Aug 2020
6 answers
112 views

Hi sir,

 

            I use radgrid in that i give MasterTableView in that datakeynames and clientdatakeynames some time it show error like this"Cannot read property 'get_dataItems' of null". once i clear the temp file and run again it work. After 2 days it show some error again. I need solution for this ASAP.

M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 10 Aug 2020
3 answers
333 views
Hi,

I need to send an Email containing some information and also 3 RadGrid's. I would like to paste them in the body of email (not attached) in the same way that they are in the software (skin style) but with no paging / buttons and also with hierarchy expanded.

Thanks for your help,

Vinicius
Doncho
Telerik team
 answered on 07 Aug 2020
6 answers
562 views

 The way the button is setup, is that there are a couple of rad buttons inside a rad tree list, of which is in a user control, and the usercontrol is inside a rad wizard, and finally the rad wizard is inside an rad ajax panel. I tested the wizard with the buttons locally on my machine and pushed it online and I have no issues. However, I am getting error emails that it seems to be throwing an error on the rad button, with a couple of other users. So far I only received two of the errors in the control. So I am unsure as to why it would be throwing an error. Would any one know why it worked for me but it threw these errors on a couple of users?

Here are a couple of the stack trace errors:

System.ArgumentException: Invalid object passed in, ':' or '}' expected. (181): {"text":"Add","value":"","checked":false,"target":"","navigateUrl":"","commandName":"AddTag","commandArgument":"","autoPostBack":true,"selectedToggleStateIndex":0,"validationGroup"% at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at Telerik.Web.UI.RadButton.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

Here's another one :

System.ArgumentException: Unterminated string passed in. (29): {"text":"Add","value":"","che at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeString() at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeMemberName() at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at Telerik.Web.UI.RadButton.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Vessy
Telerik team
 answered on 07 Aug 2020
2 answers
251 views

Hi

We need to download version 2014.3.1209 of Telerik UI for ASP.NET AJAX, as we're working on an app from a client which is using that version.

Under download software i only see a few version, is there a way to get this specific version at all?

 

Thanks

Richard
Top achievements
Rank 1
 answered on 06 Aug 2020
1 answer
144 views

I am dynamically adding RadFilter editors, such as  RadFilterTextFieldEditor, to RadFilter, server side.

When the web page is running, if a user enters certain "dangerous" text strings such as "<!--" or "<script>" into the RadFilterTextFieldEditor, the RadFilter control stops functioning (you can no longer add new expressions or groups to your Filter expression).  If I try to navigate to another page in my web app, I get logged out because my session has been destroyed/lost.  There MAY be an unhandled "A potentially dangerous Request.Form value was detected" exception that is causing the user session to be destroyed.

My fix would be to intercept the RadFilterTextFieldEditor text and strip any potentially dangerous user input (such as embedded JavaScript).

I do not see an OnBlur/OnChange event on the RadFilterTextFieldEditor that I could use to intercept the user input before it is posted.

I tried adding an asp.net validator on the RadFilter control but that does not work because RadFilter is not an "input" type of control.

I looked at the RadFilter client side events (OnFilterCreated/OnFilterCreating) but those do not appear to allow me to strip the user text input before it is too late.

Can you suggest a way to handle RadFilterTextFieldEditor text to prevent users from entering "dangerous" text.

Courtney

 

Attila Antal
Telerik team
 answered on 06 Aug 2020
1 answer
105 views

Hi Team,
    I am using RadMultiPage and controls added in RadPageView, when i run asp page i get mouse out and mouse over actions on same time, when i mouse over it calendar icon just move from rights, the ordinary behavior is  just change the icon color from grey to blue, but here appear both color icon just move right to left.

 

     <telerik:RadMultiPage ID="SideOperationsPage" Width="100%" Height="100%"  ScrollBars="none"
                            runat="server" SelectedIndex="0">
                            <telerik:RadPageView ID="DefaultPage" Width="100%" Height="100%" runat="server">

                                <div style="width: 100%; height: 100%; overflow: auto;">

<table>

<tr>

  <td style="width: 60%;" align="center">
                                                <telerik:RadDatePicker ID="dcreatedto" DateInput-DateFormat="dd/MM/yyyy" Width="97%" runat="server">
                                                    <Calendar ID="Calendar2" runat="server">
                                                        <SpecialDays>
                                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="Yellow">
                                                            </telerik:RadCalendarDay>
                                                        </SpecialDays>
                                                    </Calendar>
                                                </telerik:RadDatePicker>
                                            </td>

</tr>

</table>

</div>

</telerik:RadPageView>

    <telerik:RadPageView ID="CustomPage" Width="100%" Height="100%" runat="server">

                                <div style="width: 100%; height: 100%; overflow: auto;">

                                    

<table>
<tr>
  <td style="width: 60%;" align="center">
                                                <telerik:RadDatePicker ID="dcreatedfrom" DateInput-DateFormat="dd/MM/yyyy" Width="97%" runat="server">
                                                    <Calendar ID="Calendar2" runat="server">
                                                        <SpecialDays>
                                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="Yellow">
                                                            </telerik:RadCalendarDay>
                                                        </SpecialDays>
                                                    </Calendar>
                                                </telerik:RadDatePicker>
                                            </td>
</tr>
</table>

                                    

                                </div>

                            </telerik:RadPageView>
                        </telerik:RadMultiPage>

 

Same as combobox also behave like that 

 

Here the screenshot

Combobox

Before mouse hover -- http://prntscr.com/t9pmju

After mouse hover --http://prntscr.com/t9pmt8

 

 

Calendar

Before mouse hover -- http://prntscr.com/t9pb50

After mouse hover -- http://prntscr.com/t9pena

 

Note : That RadMultiPage in div control which is call div control like sliding drawer.

Pls reply asap

Thanks

M Kumar
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 06 Aug 2020
1 answer
180 views

Hi Team,

Recently we upgraded the telerik version on our web app, and experiencing 60% increase in the loading time. 

Version upgraded to - 2020.1.219.45

Issues with both loading the content on grid , also the export feature ( export to excel ) went upto 100% increase in loading time. 

Pls help us to fix these performance issues. 

 

With regards

Shankar M

Doncho
Telerik team
 answered on 05 Aug 2020
1 answer
2.0K+ views

Hello,

The project that i'm working on uses Telerik version 2013.3.1324.40 and recently the following error happened in our client (see attached image for more details):

Uncaught TypeError: Cannot read property 'parentNode' of null at Object._endRequest (Telerik.Web.UI.WebRe...e41%3ae4f8f289:6089)

When analyzing the JS line in which the problem occurred we realized that it is related to the panels that Ajax uses to update the page objects (in this case, the absence of them).

However, so far we have not been able to simulate the situation and the customer himself confirmed that the error is irregular and after the error happens they reenter the page and do the same action and it works just fine.

If possible, we would be grateful if you could guide us to what may be causing the error in order to correct it.

Note: I apologize for any grammatical errors as english is not my first language.

Best regards,

Vessy
Telerik team
 answered on 05 Aug 2020
13 answers
3.5K+ views
Hi all,

how to use find control in rad grid item command ... i have two text boxes. i wish to retrieve the values from that textboxes inside the rad grid item command.. please help how it's possible...

Regards,
Prassin
Roger
Top achievements
Rank 1
Veteran
 answered on 04 Aug 2020
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?