Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
190 views

Hi there,

I added RadScheduler Telerik Scenario with "Web Service with Custom Provider" option, and then added "Year View".

Everything works fine except an error message when I mouse over on the appointment cell. I debugged and noticed that embed tooltip on year view does not initialize custom schedulerInfo. Is there a way to override client event and initialize schedulerInfo ???

Here are codes:

<script type="text/javascript">
 
    var teacherID = "all";
 
    function OnClientSelectedIndexChanged(sender, args) {
        teacherID = args.get_item().get_value();
        var scheduler = $find('<%=RadScheduler1.ClientID %>');
        scheduler.rebind();
    }
 
    function OnClientAppointmentsPopulating(sender, eventArgs) {
        eventArgs.get_schedulerInfo().TeacherID = teacherID;
    }
</script>

 

<telerik:RadScheduler ID="RadScheduler1" runat="server" OnClientAppointmentsPopulating="OnClientAppointmentsPopulating"
        AppointmentStyleMode="Default" SelectedView="MonthView" SelectedDate="2011-01-21"
        Width="100%" OverflowBehavior="Expand">
        <DayView UserSelectable="true" />
        <MonthView UserSelectable="true" />
        <YearView UserSelectable="true" />
        <WeekView UserSelectable="false" />
        <TimelineView UserSelectable="false" />
        <WebServiceSettings Path="SchedulerWebService.asmx" ResourcePopulationMode="ServerSide"  />
        <ResourceStyles>
            <telerik:ResourceStyleMapping Type="Teacher" Key="1" BackColor="Orange" />
            <telerik:ResourceStyleMapping Type="Teacher" Key="2" BackColor="Aqua" />
        </ResourceStyles>
    </telerik:RadScheduler>

 

Public Overrides Function GetAppointments(ByVal shedulerInfo As ISchedulerInfo) As IEnumerable(Of Appointment)
        Dim myInfo = TryCast(shedulerInfo, MySchedulerInfo)
        Dim teacherID As String = myInfo.TeacherID
'--> teacherID gets nothing when mouse over appointment in year view.
        Dim appointments As New List(Of Appointment)()

 

Thanks.

Jae

 

Plamen
Telerik team
 answered on 13 Dec 2016
21 answers
1.0K+ views
I want to know status of group whether it is expanded or collapsed. For that I am using RadGridInbox_Itemcommand  event .when ever i click expand or collapse icon, i am always getting e.Item.Expanded =false .The following code i used in my project .please give solution to solve this issue.
  public  void RadGridInbox_Itemcommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
      {
          ....................................       
..................................
      }
        if (e.CommandName == "ExpandCollapse")
        { 
          if (e.Item.Expanded)
         {            
        ....................................
.........................................
          }
          else
            {
  ..........................
..............
    ........................       
      }
        }
}
Gan
Top achievements
Rank 1
 answered on 13 Dec 2016
3 answers
299 views

I have the following configuration on my grid regarding validation:

<ValidationSettings EnableValidation="true" />

 

And then there are columns that have validation add like this:

<telerik:GridBoundColumn DataField="Name" HeaderText="Short Name">
    <ColumnValidationSettings EnableRequiredFieldValidation="true">
        <RequiredFieldValidator BackColor="MediumVioletRed" ErrorMessage="*" />
    </ColumnValidationSettings>
</telerik:GridBoundColumn>

 

Now, this works just fine. But this just shows a message with a red background. I want to style the input field to use the BackColor value.

Is there a good way of doing this?

Konstantin Dikov
Telerik team
 answered on 13 Dec 2016
1 answer
554 views

Hi,
I have a problem with the Radeditor and counting the length of the text inside it. When I use a JavaScript with the get_text() function the length is different from when I use Radeditor.Text.Length in code behind. I want both for client and server side validation.

It seems like they count Enter key differently. Radeditor.Text.Length count them as two characters regardless how many I use. So one Enter key is two chars and five enter key is also two chars. It trims it down or something.

The JavaScript count every enter key as one characters unless it’s a line with no text between two lines with text, then it counts that enter key as two characters.

This is my code and everything is working fine it’s just that they are counting different when it comes to enter key.

//Validates the length against the maxlength allowed
_radEditorLengthCheck: function (sender, args) {
 
       //Gets the maxLength property in my settings class
       var maxLength = this.data.maxLength;
 
       if (maxLength > 0) {
           var editor = this.data.controls.get_editor();
           var value = editor.get_text();
           args.IsValid = value.length <= maxLength;          
       }
       else {
           args.IsValid = true;
       }
   },

 

//Updates a label counter so the user can se how many characters when blur
handle_blur: function (sender, args) {
       var countlabel = this.data.objects.windowOriginalValue.data.controls.get_charCounter();
       var editor = this.data.controls.get_editor();
       var element = editor.get_contentArea();
 
       $telerik.addExternalHandler(element, "blur", function (e) {      
           var value = editor.get_text();          
           countlabel.innerHTML = value.length;
       });
   }

 

//Client side validator
protected void EditorLengthValidator_ServerValidate(object source, ServerValidateEventArgs args)
   {
           // force Text-property to update
           Radeditor.Content = Radeditor.Content;
 
           string noHTML = Radeditor.Text;
           args.IsValid = noHTML.Length <= MaxLength;
 
           //Update the Label that shows the count
           LCounterChars.InnerText = noHTML.Length.ToString();
   }

 

Ianko
Telerik team
 answered on 13 Dec 2016
4 answers
93 views

Hi

We have recently updated our web project .net framework from 4.0 to 4.6.1. After the changes we noticed that 'radCalendar' popup displays strange characters for 'NextMonth/PrevMonth' controls. The tool-tip(title attribute) in those controls shows the same strange characters. Please see attached screenshot. Could you please advice how we could resolve this.

 

Eyup
Telerik team
 answered on 13 Dec 2016
1 answer
95 views
Hi, I am having strange behavior using the RadFilterDateFieldEditor, where although the pop-up does display, it is locked November 1994.  Other dates can't be selected nor can other years, but the text box allows data entry.  When I switch from EqualTo to Between operator, the second text box displays, but when DatePicker is clicked, 'Date Out Of Range' error. I have used Firefox and Chrome, and I get this error;  IE will not load the page, as Javascript errors prevent loading.  Any ideas would be helpful.  Thanks.  Steve
Steve
Top achievements
Rank 1
 answered on 12 Dec 2016
1 answer
239 views

I am recently updated a web app to visual studio 2013..  When I check in Tools/Extensions and Updates I see Telerik ASP.NET AJAX vs Extentions version 2016.2.603.0. 

When I view one of my web pages in the design view all of the RAD Controls have this error message:
EmployeeSectionError Creating Control - rcbAccusedFailed to create designer 'Telerik.Web.UI.RadComboBox, Telerik.Web.UI, Version=2010.2.929.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' 

Why is version 2010 being refrefenced in the error messge?

However the application will run and all of the controls work.

Why do I see this error message in design view and how can I fix it?

Rumen
Telerik team
 answered on 12 Dec 2016
3 answers
178 views

Hello,

I'm using Telerik RadEditor version 2015.1.401.35 on Chrome v54. When I add a link using Hyperlink Manager giving it an email address and a text, which is the same as the email address, the link doesn't show, but if the user hovers the mouse over the link then it shows, when moving the mouse away it hides again. Is there a fix for this issue?

Regards

Vessy
Telerik team
 answered on 12 Dec 2016
3 answers
153 views
Hi,I am using the RadFilter with no real issues, except that the display width of the dropdown in  RadFilterDropDownEditor is too small (I mean, it makes no attempt to even come close to expanding to fit the text).  Is there a way to specify or change the width of the dropdown, like there is for RadFilterTextFieldEditor?            Thanks
Eyup
Telerik team
 answered on 12 Dec 2016
7 answers
301 views

The page below shows the issue. When I browse to it from a mobile device, such as iPhone or Android, the menus will not drop down. It's appears there's a conflict with hovering vs clicking.

I have other code determining if the user is browsing from a mobile device or not. Knowing that, what code I can apply to my menu that will disable hovering and only make menus drop down when clicking?


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
 
 
<body style="background-color:White">
 
    <script language="javascript" type="text/javascript">
 
 
        function MenuItemClicking(sender, args) {
 
            var item = args.get_item();
 
            if (item.get_level() === 0) {
                args.set_cancel(true);
                return;
            }
 
            alert('Menu item selected');
 
        }
 
 
    </script>
 
 
    <form id="form1" runat="server">
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true">
    </telerik:RadScriptManager>
 
 
    <div>
     
        <telerik:RadMenu ID="RadMenu1" runat="server" BorderStyle="None" OnClientItemClicking="MenuItemClicking">
            <Items>
                <telerik:RadMenuItem runat="server" Text="Data" TabIndex="-1">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Option 1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Option 2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Option 3">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Info" TabIndex="-1">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Option 4">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Option 5">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Help" TabIndex="-1">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Option 6">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Option 7">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
 
    </div>
    </form>
</body>
</html>

Nencho
Telerik team
 answered on 12 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?