Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
84 views
Hi, I have a site that works fine in all the common desktop browsers but when viewed on the standard Browser that comes with Android 4 ICS on a tablet there are just spaces where the Rotator should be?I also tried it with the Dolphin Browser for Android, same results. I could not find anything in the documentation that states it does not work on Android? It works OK in iPhone/iPod.
Slav
Telerik team
 answered on 19 Oct 2012
3 answers
208 views

Hello.

I have a case:

1) User pastes a semicolon-separated list of entries into RadAutoCompleteBox;
2) Code must refine entries according to some logic and only add valid entries to Entries collection.

But it seems that the only case when I can modify RadAutoCompleteBox.Entries collection and my modifications are shown after postback is the initial load of a page. When I process 'paste' event on client via JavaScript and use __doPostBack(), any modifications to RadAutoCompleteBox.Entries are missed.

Here's a project reproducing the problem. When I paste, for example, "Most;are" (without quotes, assuming to paste two tokens: 'Most' and 'are'), nothing is added. If I comment out UpdatePanel it works as expected, but full page postback occurs.

MainPage.aspx


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="RC.ITRequest.UI.MainPage" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2012.2.1002.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!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>
    <script type="text/javascript" src="jquery-1.8.2.min.js" ></script>
 
    <placeholder runat="server" >
        <script type="text/javascript">
            $(document).ready(function () {
                $(document).on('paste', 'input[name="' + '<%=RACB.ClientID %>'.replace('_', '$') + '"]', function (e) {
                    var el = $(this);
                    /* Just a small timeout till value can get populated */
                    setTimeout(function () {
                        // replace semicolon surrounded by sequences of space chars with single semicolon 
                        var text = $(el).val().replace(/ *; */g, ';');
                        __doPostBack('<%=RACB.ClientID %>', text);
                    }, 100);
                });
            });
        </script>
    </placeholder>
</head>
<body>
    <form id="form1" runat="server">
 
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>       
 
        <asp:UpdatePanel runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" >
            <ContentTemplate>
                <telerik:RadAutoCompleteBox runat="server"
                                            ID="RACB"
                                            InputType="Token" />
            </ContentTemplate>
        </asp:UpdatePanel>
 
        <asp:Label runat="server" ID="lblLog" /><br/>
 
        <asp:Button Text="Press me to post back!"  runat="server" />
    </div>
 
    </form>
</body>
</html>

 

MainPage.aspx.cs

using System;
using System.Collections.Generic;
using Telerik.Web.UI;
 
namespace RC.ITRequest.UI
{
    public partial class MainPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            List<string> adObjects = new List<string> {
                "Most",
                "of",
                "these",
                "pages",
                "are",
                "in",
                "the",
                "Afrikaans",
                "language",
                "spoken",
                "in",
                "South",
                "Africa"
            };
            RACB.DataSource = adObjects;
 
            if (Page.IsPostBack)
            {
                lblLog.Text += "<br/>__EVENTARGUMENT: '" + Request.Form["__EVENTARGUMENT"] + "'";               
                var newEntries = Request.Form["__EVENTARGUMENT"].Split(';');
                foreach (string newEntry in newEntries)
                {
                    RACB.Entries.Add(new AutoCompleteBoxEntry(newEntry, ""));
                }
            }
        }
    }
}

 

Ron
Top achievements
Rank 1
 answered on 19 Oct 2012
1 answer
88 views
Hello,

I have a strange problem!

I am working on an application, which requires removing nodes from the telerik OrgChart.

It is similar to the example given here:
http://demos.telerik.com/aspnet-ajax/orgchart/examples/applicationscenarios/transferemployees/defaultcs.aspx

However I have RadWindow which asks user whether he wants to remove a node. If the user clicks "Yes", the RadWindow is closed.

In order to refresh the OrgChart AjaxPanel when I close the RadWindow, I call the client side scripts on RadWindow page

function

GetRadWindow() {  

var oWindow = null

if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog  

 

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)  

 

return oWindow; 

function CloseWnd() { 

GetRadWindow().close();

}

This is turn calls the

 

 $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();  

on the Orgchart - and refreshes the chart.

However if I am only left with 2 nodes and I try to remove the child node, ajaxrequest() is not called!
If I refresh the Panel using some other mechanism, I can see that the child node is removed.

Can anyone suggest what could be causing this problem? Why is ajaxRequest() not called in some situations.

Peter Filipov
Telerik team
 answered on 19 Oct 2012
1 answer
74 views
hii,
how  can i acsess the textbox inside templatecolumn in server side
Princy
Top achievements
Rank 2
 answered on 19 Oct 2012
1 answer
83 views
hiii,
how tho get all values of a particular column in client side?


thanks...
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Oct 2012
1 answer
140 views
hii,
how  can i get the datakey value on client side on item click?
 thanks..
Shinu
Top achievements
Rank 2
 answered on 19 Oct 2012
3 answers
131 views
I have a rad button which implements the single click solutoin provided by Telerik to pervent multiple submissions.

My declaration is:

<telerik:RadButton ID="btnFind" runat="server" Text="Find Visits" style="margin:7px;" UseSubmitBehavior="false" OnClientClicked="FindClickedHandler_VFC">
                                <Icon PrimaryIconUrl="~/global/images/icons/search.png" />
                            </telerik:RadButton>


And I have a handler for the OnClientClicked Event:

function FindClickedHandler_VFC(sender, eventArgs) {
 
            var validated = Page_ClientValidate('val');
            if (!validated) {
                return;
            }
            else {
                sender.set_enabled(false);
                if (sender.get_text() == "Search") sender.set_text("Searching...");
            }
        }


When I click on the button, everything works as expected. However, in some instances, I would like to induce the button click and have it do exactly the same from some client-side code. When I call the button.click function client-side I have noticed that the cliked handler does fire, but the postback never occurs. I am guessing this has something to do with the removal of the postback behavior in the button which is necessary to prevent the double click. Is there a way to make the button do the same thing whether you click on it or call button.click client-side?

Slav
Telerik team
 answered on 19 Oct 2012
0 answers
75 views
Hi,

I have a telerik tabcontainer. in which i have a datagrid with "Edit" option. when i click on Edit option its going to display a popup with background opacity for tabcontainer. but what i want is to apply opacity for whole page by not selecting the top menu items which just above the tabcontainer.

Thanks in advance.
sanjeev.
Sanjeeva
Top achievements
Rank 1
 asked on 19 Oct 2012
3 answers
186 views
Is anyone else having a problem with Visual Studio 2012 failing when opening ANY project (new or existing) after installing the Q3 2012 Telerik Controls?

I'm trying to track it down, because I installed most of Telerik's Controls... Ajax, ORM, Winforms, Silverlight, MVC, Kendo, etc...

EDIT:  I've found the installers causing the problem.  Installing either the ASP.NET MVC or Kendo UI for ASP.NET MVC causes Visual Studio 2012 to fail.  If they are installed, any project or solution you open new or old, regardless of it's type (web, winforms, class library) you try to open causes Visual Studio 2012 to fail with the error below.

Telerik:  I'd like to get your input on this.  I've tested in on two different systems (both running Windows 7 and Visual Studio 2012 Premium), and the same thing occurs.

Falling back to all the versions I had before (which takes a REALLY long time to do), fixes the problem, but I haven't tracked down which installation is causing the issue... yet.

Opening up any project or solution, new or existing, I get this after Telerik Controls Installation...

Problem signature:

Problem Event Name: CLR20r3

Problem Signature 01: devenv.exe

Problem Signature 02: 11.0.50727.1

Problem Signature 03: 5011ecaa

Problem Signature 04: PresentationFramework

Problem Signature 05: 4.0.30319.17929

Problem Signature 06: 4ffa7956

Problem Signature 07: 959

Problem Signature 08: 165

Problem Signature 09: System.Exception

OS Version: 6.1.7601.2.1.0.256.4

Locale ID: 1033

Additional Information 1: 0a9e

Additional Information 2: 0a9e372d3b4ad19135b953a78882e789

Additional Information 3: 0a9e

Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Telerik, do you have any suggestions?

Community, have any of you run into this?

If I can track down exactly which installation is causing the problem, I'll update this thread.

Thanks, Greg

Stanley
Top achievements
Rank 1
 answered on 19 Oct 2012
3 answers
52 views
We have a reservation system that allows a user to insert an appointment with a maximum of 90 minute duration. They can schedule it for less time, and have the resizing capability to extend it to 90 minutes. I have the JS in place to restrict a user from extending the end time beyond the 90 minutes, but if they size from the start, there seems to be no way to effectively capture this and check the duration limit.

function warnIfTooLong(start, end, sender, args) {
    var appointment = args.get_appointment();
    var finalTime = new Date(start);
    var maxDuration = 90;
    finalTime.setMinutes(finalTime.getMinutes() + maxDuration);
    if (end > finalTime) {
        alert("You cannot reserve a court for that duration.");
        args.set_cancel(true);
    }
  
}  

This script works fine if you feed in the correct start and end times. However I have been unable to figure out how to get the new start time for a resized appointment, end time can be taken from args.get_newTime();

function onAppointmentResizeEnd(sender, args) {
 
    var start = args.get_appointment().get_start();
    var end = args.get_newTime();
 
    warnIfTooLong(start, end, sender, args);
}

Does anyone have any idea how I can get the start time correct from a resized appointment?

Many thanks
Clyde
Plamen
Telerik team
 answered on 19 Oct 2012
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?