Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
116 views
Hi,

I have put the RadAjaxManager in the master page and RadAjaxManagerProxy in content pages.  It works fine.  I would like to like if it is possible to use (share) a single LoadingPanel from the master page among all content pages? 

If yes, how should I define it in the content pages?

Currently, I am working as follows:

Me.ramp1.AjaxSettings.AddAjaxSetting(Me.btnSaveLong, Me.pnlEditors, Nothing)

Thanks
Steve
Telerik team
 answered on 13 May 2008
1 answer
178 views
I need to confirm if a user wants to perform an action once a context menu item is clicked but I can't seem to find the client side event to do this (no onClick event available?)
Veselin Vasilev
Telerik team
 answered on 13 May 2008
1 answer
538 views
I'm currently working on an AJAXified application which needs the occasional regular postback performed, and I ran across an oddity which I'm trying to understand.

In the client-side OnRequestStart, two arguments are returned, sender and eventArgs. "sender" corresponds to the RadAjaxManager which initiated the call; eventArgs contains references to what was actually clicked to start the request.

Naturally, the sender possesses all the properties of the page's RadAjaxManager, including set_enableAJAX, which, if called, according to the documentation, "Allows or blocks the request to be executed through AJAX. Pass True to allow AJAX, False to have the request fulfilled through a standard postback."

The eventArgs, however, also possesses its own personal properties, one of which is set_enableAjax - different case - which, according to the documentation, "sets if an AJAX request is performed. set_enableAjax(false) causes the request to be performed via standard postback."

At face value, both of these functions would seem to do the same thing. However, in experimentation (and I have no idea whether or not this applies beyond my own experience) they appear to be slightly different in scope: set_enableAJAX(false) turns off AJAX for the entire page once the initial AJAX request completes, and every call after that is a postback; while set_enableAjax(false) turns off AJAX for a single request, immediately.

This would explain a number of issues I've been having with getting AJAX requests to postback, but it may very well be that I'm mistaken - the documentation definitely doesn't imply a difference on first reading.

Some sample code:

      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 
         <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> 
               <UpdatedControls> 
                  <telerik:AjaxUpdatedControl ControlID="LoadingPanel" LoadingPanelID="RadAjaxLoadingPanel1" /> 
               </UpdatedControls> 
            </telerik:AjaxSetting> 
         </AjaxSettings> 
         <ClientEvents OnRequestStart="fnTestPostback" /> 
      </telerik:RadAjaxManager> 
 

The following Javascript works as expected: the request is submitted as a postback immediately.

function fnTestPostback(sender, args) { 
   try { 
      if (args.EventTarget.indexOf("SubmitAndGenerate") != -1) { 
         args.set_enableAjax(false); 
         return true; 
      } 
   } 
   catch (ex) { 
      alert("Error overriding postback: "+ex.message); 
   } 
} 

The following Javascript code does not work as expected: the first request is submitted as AJAX, receiving an invalid AJAX error (there are Response.Writes in the codebehind), but all subsequent requests through that control are postbacks, as expected.

function fnTestPostback(sender, args) { 
   try { 
      if (args.EventTarget.indexOf("SubmitAndGenerate") != -1) { 
         sender.set_enableAJAX(false); 
         return true; 
      } 
   } 
   catch (ex) { 
      alert("Error overriding postback: "+ex.message); 
   } 
} 

The code works now; I just want to know whether I've misunderstood the documentation or am completely mistaken about the reasons for these results. Make sense?

My best guess is that set_enableAJAX refers to the global setting of the RadAjaxManager rather than the setting of the current request. Let me know if I'm understanding that correctly!
Steve
Telerik team
 answered on 13 May 2008
1 answer
145 views
Hi,

I want a loading page for all the controls in the web site but i dont find anything about this issue.

The idea is something like gmail.

Thank
BBS
Vlad
Telerik team
 answered on 13 May 2008
1 answer
134 views
I have a ToolTip inside an absolutely positioned element, and when using the Modal feature, the gray box starts at the top left of the absolutely positioned element.  Also the ToolTip itself is off it's mark if I don't use Modal.  I've tried setting z-index to 10, but it doesn't seem to work.  Seems like it would be a common problem, but I didn't find much in the forum.  Thanks in advance!
Georgi Tunev
Telerik team
 answered on 13 May 2008
3 answers
127 views
The current site has several hundred ASPX pages, with most displaying a relatively static menu that is created via Server.Execute calls with a few parameters.

I tried doing that with a test page that included RadMenu, which would be a good solution for getting it working promptly (i.e. just change name to the Server.Execute page's name)

I get the menu, but none of the animation or dropdowns, which means (I think) that the final rendered page is missing all the JavaScript code.

While I realize there is a "proper" way to do this via Master Pages, time/budget do not allow re-engineering that much of the site at this time.

Any pragmatic workarounds gratefully accepted!
Veselin Vasilev
Telerik team
 answered on 13 May 2008
2 answers
108 views
I'm talking about a custom refresh link in the CommandItemTemplate. The commandname is "RebindGrid", and the grid itself rebinds perfectly.

But other Ajaxified content on the same page stops working. For instance we get these two JavaScript errors, the first when trying to click a custom linkbutton control and the other when clicking a normal button control.
1)
"Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.Animation.LengthAnimation' cannot be converted to type 'AjaxControlToolkit.Animation.Animation'. Parameter name: instance"

2)
"Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.ConfirmButtonBehavior' cannot be converted to type 'AjaxControlToolkit.ConfirmButtonBehavior'. Parameter name: instance"

For 1) we're not using any AJAX features directly, other than the control being placed within an UpdatePanel. For 2) we're using a plain "asp:Button" control within another UpdatePanel.
MOGRO
Top achievements
Rank 1
 answered on 13 May 2008
5 answers
112 views
I've been able to generate a simple sample that generates a security exception when running on a shared hosting environment.

The error:

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
   System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +281
   System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +67
   System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +145
   System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +43
   System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +41
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +139
   System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +51

The sample page:

<%

@ Page Language="C#" %>

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>PanelBar Test</title>

</

head>

<

body>

<form id="form1" runat="server">

<div>

<asp:ScriptManager ID="ScriptManager1" runat="server" />

<asp:XmlDataSource ID="XmlDataSource1" runat="server"

DataFile="~/menu.xml" XPath="/Items/Item"></asp:XmlDataSource>

<telerik:RadPanelbar runat="server" ID="RadPanelbar1" Skin="Mac"

datasourceid="XmlDataSource1"

DataTextField="Text" DataNavigateUrlField="Url" DataValueField="Text" Width="140px"

OnClientItemClicked="OnClientItemClickedHandlerForMenu" >

<ExpandAnimation Type="OutQuint" Duration="300" />

<CollapseAnimation Type="OutQuint" Duration="300" />

</telerik:RadPanelbar>

</div>

<

input type="submit" />

</form>

</

body>

<

script type="text/javascript">

function

OnClientItemClickedHandlerForMenu(sender, eventArgs)

{

}

</

script>

</

html>


The page loads fine.  However, when I click on the 'submit' button during the postback it generates the above security error.

Gerry
Yavor
Telerik team
 answered on 13 May 2008
1 answer
147 views
hi

I have combobox drpmth that has a list of value:

01
02
03
04
05
07
08
09
10
11
12

And a combobox drpYear has value:

2008
2009
2010
2011
2012

In my codebehind:

drpYear.SelectedValue = Year(Now()).ToString
drpMth.SelectedValue = Month(Now).ToString

The drpYear works fine but not drpMth. Am I missing something? Thanks

Simon
Telerik team
 answered on 13 May 2008
1 answer
68 views
Hi Telerik,

I have a problem sorting a grid that is nested in RadPane.  Sorting of the grid works fine outside of RadPane.  I load a data source of the grid from the code.  When I click on the header of the column, grid disappeared.  I have to reload the page to see it.
Shinu
Top achievements
Rank 2
 answered on 13 May 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?