Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
138 views
Hi!

When I paste (Ctrl+V) a long string into RadAutocompleteBox, for example, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", the input box only shows a part of that string. And if I immediately press left cursor key on keyboard the input box expands. Why doesn't it expand right after paste?
Bozhidar
Telerik team
 answered on 22 Nov 2012
1 answer
100 views
Hi,

My customer is getting this error after performing a spellchek on a rad edior.
spell check handler server error 503
<HTML>Network error</HTML>
... A communication error occured. "Operation timed out"
...The web server might be down or busy or experiencing other problems preventing it from responding to requests. You might wish to try again at a later time.

I have googled it but no one else seem to ever had this problem and I can not reproduce it on my local machine.
It looks like a time out error, I was just wandering if anyone else came accross it.

Many thanks

Ellie
Rumen
Telerik team
 answered on 22 Nov 2012
1 answer
507 views
I am having problems with the client side events. Im trying to fire a javascript whenever a key is pressed:
<script language="javascript" type="text/javascript">
   
        function tbGroupNamekeypress(sender, eventArgs) {
            var c = eventArgs.get_keyCharacter();
            var idtbGroupname = '<%=tbGroupName.ClientID%>';
            var tbGroupnameValue = encodeURI($('#' + idtbGroupname).val() + c);
            $('#divGroupNamePreview').load("/_layouts/checkGroupName.aspx?name=" + tbGroupnameValue + "&t=" + new Date().getTime());
        }
 </script>
 
<telerik:RadTextBox runat="server" ID="tbGroupName" Width="79%" Skin="Metro" ClientEvents-OnKeyPress="tbGroupNamekeypress" MaxLength="47"></telerik:RadTextBox>

this works for all keys except the backspace key. Is there any workaround for this? 

Regards,
Frank
Vasil
Telerik team
 answered on 22 Nov 2012
1 answer
105 views
I'm try to change the start time of an appointment when it call the function "OnClientAppointmentMoveEnd", but it will not change the start time.
Here is my codes:

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="RadSchedulerAdvancedForm.aspx.vb"
 Inherits="RadSchedulerAdvancedForm" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="scheduler" TagName="AdvancedForm" Src="AdvancedForm.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <style type="text/css">
  .RadScheduler .rsAdvancedEdit .RadColorPicker label
  {
   text-align: left;
   display: block;
   padding: 0;
  }
 </style>
 <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body class="BODY">
 <form id="Form1" method="post" runat="server">
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
  <Scripts>
   <asp:ScriptReference Path="~/ObjectDataSource/AdvancedForm.js" />
   <%--Needed for JavaScript IntelliSense in VS2010--%>
   <%--For VS2008 replace RadScriptManager with ScriptManager--%>
   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
  </Scripts>
 </telerik:RadScriptManager>
 <script type="text/javascript"> 
  //<![CDATA[
    
     function ChangeStartTime() {
     }
     function ClientAppointmentEditing(sender, eventArgs) {
     }

     function OnClientAppointmentMoveEnd(sender, eventArgs) {
                     var newStartTimeAvailable = new Date('Wed Nov 20 11:00:00 EST 2012');
                     eventArgs.get_appointment().set_start(newStartTimeAvailable);
                     sender.updateAppointment(eventArgs.get_appointment());
                 }

  var schedulerTemplates = {};

  function schedulerFormCreated(scheduler, eventArgs) {
   // Create a client-side object only for the advanced templates
   var mode = eventArgs.get_mode();
   if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
     mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
    // Initialize the client-side object for the advanced form
    var formElement = eventArgs.get_formElement();
    var templateKey = scheduler.get_id() + "_" + mode;
    var advancedTemplate = schedulerTemplates[templateKey];
    if (!advancedTemplate) {
     // Initialize the template for this RadScheduler instance
     // and cache it in the schedulerTemplates dictionary
     var schedulerElement = scheduler.get_element();
     var isModal = scheduler.get_advancedFormSettings().modal;
     advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
     advancedTemplate.initialize();

     schedulerTemplates[templateKey] = advancedTemplate;

     // Remove the template object from the dictionary on dispose.
     scheduler.add_disposing(function () {
      schedulerTemplates[templateKey] = null;
     });
    }

    // Are we using Web Service data binding?
    if (!scheduler.get_webServiceSettings().get_isEmpty()) {
     // Populate the form with the appointment data
     var apt = eventArgs.get_appointment();
     var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
     advancedTemplate.populate(apt, isInsert);
    }
   }
  }
   
  //]]>
 </script>
 <div class="exampleContainer">
  <telerik:RadScheduler runat="server" ID="RadScheduler1" DataEndField="End" Reminders-Enabled="true"
   AppointmentStyleMode="Default" DataKeyField="ID"
   
   DataStartField="Start" CustomAttributeNames="AppointmentColor"
   OnClientFormCreated="schedulerFormCreated" DataSubjectField="Subject" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
   
            onclientappointmentmoveend="OnClientAppointmentMoveEnd" Height="640px"
            OverflowBehavior="Expand" AllowDelete="False" SelectedView="WeekView"
                                                                Localization-ContextMenuEdit="AAA"
                                                                onclientappointmentediting="ClientAppointmentEditing"
                                                               
            >
   <AppointmentTemplate>
                 <div class="rsAptSubject">
                     <%# Eval("Subject") %>
                 </div>
                 <%# Eval("Description") %>
             </AppointmentTemplate>
             <AdvancedEditTemplate>
                 <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
                     Subject='<%# Bind("Subject") %>'
                     Description='<%# Bind("Description") %>'
                     Start='<%# Bind("Start") %>'
                     End='<%# Bind("End") %>'
                     RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                        Reminder='<%# Bind("Reminder") %>'
                     AppointmentColor='<%# Bind("AppointmentColor") %>'
                         />
                         <%--TimeZoneID='<%# Bind("TimeZoneID") %>'--%>
                         <%--UserID='<%# Bind("User") %>'--%>
                         <%--RoomID='<%# Bind("Room") %>'--%>
             </AdvancedEditTemplate>
             <AdvancedInsertTemplate>
                 <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert"
                     Subject='<%# Bind("Subject") %>'
                     Start='<%# Bind("Start") %>'
                     End='<%# Bind("End") %>'
                     Description='<%# Bind("Description") %>'
                     RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                        Reminder='<%# Bind("Reminder") %>'
                     AppointmentColor='<%# Bind("AppointmentColor") %>'
                         />
                         <%--TimeZoneID='<%# Bind("TimeZoneID") %>'--%>
                         <%--UserID='<%# Bind("User") %>'--%>
                         <%--RoomID='<%# Bind("Room") %>'--%>
             </AdvancedInsertTemplate>
           
                                                        <AdvancedForm Modal="True" Width="400px" EnableTimeZonesEditing="True" />

                                                        <ResourceTypes>
<%--                                                        <telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="USERID"
                                                        KeyField="ID" Name="Users" TextField="USERNAME" />--%>
                                                        </ResourceTypes>
                                                        <TimelineView UserSelectable="False" />
                                                        <WeekView DayEndTime="23:59:59" ColumnHeaderDateFormat="dddd, d"
                                                            GroupingDirection="Vertical" />
                                                        <Localization AdvancedEditAppointment="Edit" AdvancedNewAppointment="New"
                                                            AllDay="Range" />
                                                            
                                                        <MonthView FirstDayHeaderDateFormat="MMMM dd" ColumnHeaderDateFormat="MMMM dddd"
                                                            HeaderDateFormat="MMMM, yyyy" />
                                                    </telerik:RadScheduler>
  <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="AllUsers"
   TypeName="UserList"></asp:ObjectDataSource>
  <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteAppointment"
   InsertMethod="InsertAppointment" SelectMethod="AllData" TypeName="AppointmentList"
   UpdateMethod="UpdateAppointment">
   <DeleteParameters>
    <asp:Parameter Name="ID" Type="String" />
   </DeleteParameters>
   <InsertParameters>
    <asp:Parameter Name="Subject" Type="String" />
    <asp:Parameter Name="AppointmentColor" Type="String" />
    <asp:Parameter Name="Start" Type="DateTime" />
    <asp:Parameter Name="End" Type="DateTime" />
    <asp:Parameter Name="Reminder" Type="String" />
    <asp:Parameter Name="UserID" Type="Int32" />
    <asp:Parameter Name="TimeZoneID" Type="String" />
    <asp:Parameter Name="RecurrenceRule" Type="String" />
    <asp:Parameter Name="RecurrenceParentID" Type="String" />
   </InsertParameters>
   <UpdateParameters>
    <asp:Parameter Name="ID" Type="String" />
    <asp:Parameter Name="Subject" Type="String" />
    <asp:Parameter Name="AppointmentColor" Type="String" />
    <asp:Parameter Name="Start" Type="DateTime" />
    <asp:Parameter Name="End" Type="DateTime" />
    <asp:Parameter Name="RecurrenceRule" Type="String" />
    <asp:Parameter Name="RecurrenceParentID" Type="String" />
    <asp:Parameter Name="TimeZoneID" Type="String" />
    <asp:Parameter Name="Reminder" Type="String" />
    <asp:Parameter Name="UserID" Type="Int32" />
   </UpdateParameters>
  </asp:ObjectDataSource>
 </div>
 </form>
</body>
</html>


Boyan Dimitrov
Telerik team
 answered on 22 Nov 2012
1 answer
83 views
Hello Guys,

In my radGrid, I have a collection of declaratively defined Columns and some, that are added to my grid my codebehind, depending on some irrelevant business stuff.
The problem occurring now is, that I can not open any dialog, with the probably well known message, that a httphandler registration is missing. Unfortunately it is not missing the web.config of my web Application and the also well known helping hints have been rechecked already. Am I now missing some ASP.NET hidden stuff, that prevents the column-editors from using the registered handler?
Currently I can not use any dialog (table wizard, picture manager, URL handler, ...)

Any help or hints would be great!
Thanks in advance!
Peter

Peter
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
195 views
Hi,

I pass the value of the value of the item selected from a radcombox to another. The first is radcombox Region and I have to pass the valure the selected region or typed, the second radcombo to load the list of provinces that refer to the region. Here is the code I use hand side aspx and vb net:

<telerik:RadComboBox ID="Regione" Runat="server" CollapseDelay="100"
    EnableLoadOnDemand="True" HighlightTemplatedItems="True" IsCaseSensitive="True"
    LoadingMessage="Caricamento..." DropDownWidth="160px" Filter="StartsWith" Width="160px"
    MaxHeight="175px" ShowMoreResultsBox="True" Height="175px" AutoPostBack="True">
</telerik:RadComboBox>
 
 
<telerik:RadComboBox ID="Provincia" Runat="server" CollapseDelay="100"
    DropDownWidth="170px" EnableLoadOnDemand="True" Filter="StartsWith"
    HighlightTemplatedItems="True" IsCaseSensitive="True"
    LoadingMessage="Caricamento..." MaxHeight="175px" ShowMoreResultsBox="True"
    Width="170px" Height="175px" EmptyMessage="Scegli la regione">
</telerik:RadComboBox>



    
Private Const ItemsRegion As Integer = 11
    Private Const ItemsProvincs As Integer = 10
    Private idregione As Integer = 0
Protected Sub Region_ItemsRequested(sender As Object, e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles Region.ItemsRequested
        Dim data As DataTable = GetDataRegion(e.Text)
        Dim itemOffset As Integer = e.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + ItemsRegion, data.Rows.Count)
 
        e.EndOfItems = endOffset = data.Rows.Count
        For i As Integer = itemOffset To endOffset - 1
            Region.Items.Add(New RadComboBoxItem(data.Rows(i)("descrizione").ToString(), data.Rows(i)("id").ToString()))
        Next
        e.Message = GetStatusMessageRegion(endOffset, data.Rows.Count)
    End Sub
    Private Shared Function GetDataRegion(text As String) As DataTable
 
        Dim sqlSelectCommand As String = "SELECT [id], [descrizione] from [tab_regioni] WHERE [descrizione] LIKE @desc + '%' Order By [descrizione]"
 
        Dim adapter As New SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
        adapter.SelectCommand.Parameters.AddWithValue("@desc", text)
 
        Dim data As New DataTable()
 
        adapter.Fill(data)
 
        Return data
 
    End Function
 
    Private Shared Function GetStatusMessageRegion(offset As Integer, total As Integer) As String
 
        If total <= 0 Then
 
            Return "Regione non trovata"
 
        End If
 
        Return [String].Format("Lista: <b>1</b>-<b>{0}</b> di <b>{1}</b>", offset, total)
 
    End Function
 
    Protected Sub Provincs_ItemsRequested(sender As Object, e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles Provincs.ItemsRequested
        Dim data As DataTable = GetDataProvincs(e.Text, idregione)
        Dim itemOffset As Integer = e.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + ItemsProvincs, data.Rows.Count)
 
        e.EndOfItems = endOffset = data.Rows.Count
        For i As Integer = itemOffset To endOffset - 1
            Provincs.Items.Add(New RadComboBoxItem(data.Rows(i)("descrizione").ToString(), data.Rows(i)("id").ToString()))
        Next
        e.Message = GetStatusMessageProvincs(endOffset, data.Rows.Count)
    End Sub
    Private Shared Function GetDataProvincs(text As String, id As Int32) As DataTable
 
        Dim sqlSelectCommand As String = "SELECT [id], [idregione], [descrizione] from [tab_province] WHERE [idregione]=@idregione and [descrizione] LIKE @desc + '%' Order By [descrizione]"
 
        Dim adapter As New SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
        adapter.SelectCommand.Parameters.AddWithValue("@desc", text)
        adapter.SelectCommand.Parameters.AddWithValue("@idregione", id)
        Dim data As New DataTable()
 
        adapter.Fill(data)
 
        Return data
 
    End Function
 
    Private Shared Function GetStatusMessageProvincs(offset As Integer, total As Integer) As String
 
        If total <= 0 Then
 
            Return "Provincia non trovata"
 
        End If
 
        Return [String].Format("Lista: <b>1</b>-<b>{0}</b> di <b>{1}</b>", offset, total)
 
    End Function

bye
Nencho
Telerik team
 answered on 22 Nov 2012
1 answer
219 views
Hi,

I have a RadMenu context menu on my page. Items are added to it and removed from it client side. The problem is the items are not the same width. Some items can be very long in which case they extend past the right boundary of the context menu. Shorter items don't extend to the width of the context menu.

I thought I could use the ClientShowing method to loop through the items currently in the menu, determine the width of the longest one, then set the width of all the other items to this value. However I can't get the width of any of the items in the menu. The width and offsetwidth properties of each item (and it's linkelement, text element etc) are always 0.

How do I get the actual value of these?

Thanks,

Matt
Kate
Telerik team
 answered on 22 Nov 2012
2 answers
124 views
Hi Guys,

Our users may upload a .shp file. To process these type of file you need 3 in total. The 2 other files have the same name but different extensions. I want the user to load the main file (.myFile.shp) and for telerik uploader to go and get the 2 other files dynamically (so long as they are in the same folder on the clients machine)

Does any one know how i can add to the list of files to be uploaded 'on the fly'

Thanks

Harvo
Harvo
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
119 views
Hi,
I have a radmaskedtextbox that is intended for gender-input. the desired mask should accept only one of the following inputs: "m", "f", "M", "F", or "" (the empty ("") is obviously necessary to wait for the user to input the gender)

That's it, I can't discover the mask that should provided in the mask property.

Thank you for your help.
Kostadin
Telerik team
 answered on 22 Nov 2012
1 answer
103 views
how search  Menu items 
Princy
Top achievements
Rank 2
 answered on 22 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?