Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
511 views
Hi:

I have a long running process that I placed a Loading Panel on the form, but if it take say 92 seconds, it throws the following exception:
  Microsoft JScript runtime error:
  Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.
How can I set the timeout?

Phil
Rhonda
Top achievements
Rank 1
 answered on 27 Apr 2011
1 answer
76 views
How can I apply the same CSS style that is being used by my Rad Controls onto another control like a asp:label? Ex. I have all of my Rad controls set to use the Black skin and I want all of my standard asp:labels to have the same text/font/etc that is being used by Rad-Slider
Matt
Top achievements
Rank 1
 answered on 27 Apr 2011
6 answers
80 views
Hi,

i am new to telerik. I have built a user control with the following code:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" Codebehind="WebUserControl.ascx.cs" ClassName="WebUserControl" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<asp:SqlDataSource ID="GridSource" runat="server" ConnectionString="<%$ ConnectionStrings:Test%>" SelectCommand="SELECT * FROM Evt"> </asp:SqlDataSource>
 
<telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
        DataSourceID="GridSource" AllowFilteringByColumn="True" AllowPaging="True"
        AllowSorting="True" ShowGroupPanel="True">
        <ClientSettings AllowDragToGroup="True">
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
    <MasterTableView>
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
 
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
 
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>
    </MasterTableView>
 
    <FilterMenu EnableImageSprites="False"></FilterMenu>
 
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
</telerik:RadGrid>
  
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1"
                    LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
 </telerik:RadAjaxManager>
When i put it in a content tag in my html code it works fine. But i would like to add the control via a click on a button.
So on the page where the button is located i wrote the following in the code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class SiteMaster : System.Web.UI.MasterPage
{
    WebUserControl ctrl;
 
    protected void Page_Load(object sender, EventArgs e)
    {
            Button BTN1 = new Button();
            BTN1.Click += new EventHandler(BTN_Click);
 
            this.MenuContent.Controls.Add(BTN1);
    }
    protected void BTN_Click(object sender, EventArgs e)
    {
        ctrl = (WebUserControl)LoadControl("~/WebUserControl.ascx");
        this.MenuContent.Controls.Add(ctrl);
    }
}
Has anybody an idea why this doesn't work or a solution so ajax functionality will be enabled for this purpose?

Thanks
Simon
Pavlina
Telerik team
 answered on 27 Apr 2011
13 answers
199 views
Hi,
I am using Rad Calender inside a  Repeater.

<asp:Repeater ID="ResultRpt" runat="server">
 <ItemTemplate>
 <telerik:RadCalendar Style="width: 191px; height: 123px" ID="RadCalendar1" runat="server"
  EnableMonthYearFastNavigation="false" AutoPostBack="true" MultiViewColumns="1"
  MultiViewRows="1" EnableMultiSelect="true">
  </telerik:RadCalendar>
<telerik:RadToolTipManager Width="270px" Height="135px" Style="font-size: 11px" RelativeTo="Element"
  ID="RadToolTipManager1" runat="server" OffsetX="7" Position="MiddleRight"   OnAjaxUpdate="RadToolTipmanager1_AjaxUpdate"  Skin="Telerik" AutoCloseDelay="90000"                            </telerik:RadToolTipManager>
  </ItemTemplate>
  </asp:Repeater>

this is my  rad ajax manager

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadCalendar1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadCalendar1"    LoadingPanelID="RadAjaxLoadingPanel1">
                   </telerik:AjaxUpdatedControl>
               </UpdatedControls>
           </telerik:AjaxSetting>
              <telerik:AjaxSetting AjaxControlID="calMarker">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadCalendar1"    LoadingPanelID="RadAjaxLoadingPanel1">
                   </telerik:AjaxUpdatedControl>
                   <telerik:AjaxUpdatedControl ControlID="calMarker" LoadingPanelID="RadAjaxLoadingPanel1">
                   </telerik:AjaxUpdatedControl>
               </UpdatedControls>
           </telerik:AjaxSetting>
            </AjaxSettings>
       <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
   </telerik:RadAjaxManager>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue" />

The tool tip on the date is not working . And the loading panel is not working for the onclick on the rad calender(instead the page is postbacking) .

The calmarker control is a panel bar which is also inside the repeater its loading panel is also not working .

These was working when there was no repeater. After i put the repeater control the issue started.

Regards
Sankardeep

Rob Caruk
Top achievements
Rank 1
 answered on 27 Apr 2011
6 answers
592 views
Hi,

I have a Page Controller design pattern, so I have a base Page class that defines and dumps out a RadAjaxManager control. The (edited) base class is:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Web; 
using System.Xml; 
using xxx.yyy.ASPNET.Security; 
using xxx.yyy.Client; 
using xxx.yyy.Client.Security; 
using xxx.yyy.Core; 
using Telerik.Web.UI; 
 
namespace xxx.yyy.ASPNET 
    public class AuthenticatedyyyPage : yyyPageBase 
    { 
        private RadAjaxManager _radAjaxManager=null
        #region ~ Properties ~ 
 
        public RadAjaxManager AjaxManager 
        { 
            get { return _radAjaxManager; } 
        } 
        #endregion 
 
        protected override void OnLoad(EventArgs e) 
        { 
            // set up global AJAX Manager 
            _radAjaxManager = BuildRadAjaxManager(); 
            Form.Controls.Add(_radAjaxManager); 
 
            if (!ClientScript.IsClientScriptBlockRegistered(_radAjaxManager.ClientID)) 
            { 
                ClientScript.RegisterClientScriptBlock(_radAjaxManager.GetType(), _radAjaxManager.ClientID,GenerateJavascript(),true); 
            } 
             
 
            base.OnLoad(e); 
        } 
 
        protected virtual RadAjaxManager BuildRadAjaxManager() 
        { 
            RadAjaxManager radAjaxManager = new RadAjaxManager(); 
            radAjaxManager.ID = "radAjaxManager";    
            return radAjaxManager; 
        } 
 
        private string GenerateJavascript() 
        { 
            StringBuilder sb = new StringBuilder(); 
 
             
 
            sb.Append("\n\nfunction migGetRadAjaxManager() {\n"); 
            sb.Append("\tvar ajaxManager=$find(\"" + _radAjaxManager.ClientID + "\");\n"); 
            sb.Append("\treturn ajaxManager;\n"); 
            sb.Append("}\n\n"); 
 
 
            return sb.ToString(); 
        } 
    } 
 
 

(The RadAjaxManager is added into the Form and appears in the rendered HTML)

In the derived page, I want to add an AjaxSetting programmatically (as per http://www.telerik.com/help/aspnet-ajax/ajxaddajaxsettingsprogrammatically.html) in the Page_Load():

protected void Page_Load(object sender, EventArgs e) 
        { 
            AjaxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(AjaxManager_AjaxRequest); 
             
            AjaxManager.AjaxSettings.AddAjaxSetting(btnCancel0, pnlScriptInjector); 
             
        } 

But this results in the exception:

Object reference not set to an instance of an object.
AjaxManager.AjaxSettings.AddAjaxSetting(btnCancel0, pnlScriptInjector); 
             

   at Telerik.Web.UI.AjaxSettingsCollection.AddAjaxSetting(Control ajaxifiedControl, Control updatedControl) 
   at xxx.yyy.ASPNET.Presentation.Secure.Admin.ImportWindowsUsers.Page_Load(Object sender, EventArgs e) in c:\dev2008\yyy2\yyy_WEB\secure\admin\ImportWindowsUsers.aspx.cs:line 128 
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 
   at System.Web.UI.Control.OnLoad(EventArgs e) 
   at xxx.yyy.ASPNET.yyyBase.OnLoad(EventArgs e) in C:\dev2008\yyy2\xxx.yyy.ASPNET\yyyPageBase.cs:line 45 
   at xxx.yyy.ASPNET.Authenticatedyyy.OnLoad(EventArgs e) in C:\dev2008\yyy\xxx.yyy.ASPNET\AuthenticatedyyyPage.cs:line 138 
   at System.Web.UI.Control.LoadRecursive() 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

Inspecting the variables in the debugger and I can't see anything that is null.

Could you please tell me why is this happening? Am I using it right?

Jack
Top achievements
Rank 1
 answered on 27 Apr 2011
4 answers
227 views
Happy Monday, everyone!

Our users have requested that when we use the RadListBox with CheckBoxes that when they click on a checkbox that the entire row become focused - like it does when they click on the text of a row.

I've tried setting focus manually in the ItemChecked event with the following but no matter what I do I can't get this accomplished.
event.get_item().select();
event.get_item().get_element().focus();

Anyone managed to get this working?

Thanks!
Thad
Thad
Top achievements
Rank 2
 answered on 27 Apr 2011
2 answers
62 views
Hi,
  I'm not able to start_edit() a new node at the 2nd Level client-side if the parent node does not have any child previously and this is the only child.

Below is the code I've written to add a new node.

                function AddNode(parentNode)
                {
                    var tree = parentNode.get_treeView();
                    tree.trackChanges();
                    var node = new Telerik.Web.UI.RadTreeNode();
                    node.set_text("New Node");
                    node.set_value("New Node");
                    parentNode.get_nodes().add(node);
                    node.select();
                    tree.add_nodeEdited(NodeAdded);
                    tree.commitChanges();
                    node.startEdit();
                }


at the node.startEdit() statement it throws an error as: "htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."


Please note that the ExpandMode of the Nodes are "WebService"

-Himanshu

Himanshu
Top achievements
Rank 1
 answered on 27 Apr 2011
2 answers
89 views

Hello !

i would like to do the same think the is working:

 

 

 

 

<asp:Label CssClass="edInline" ID="LblActif" Width="115px" runat="server"><%= DatabaseResourceManager.Translate("5031/Actif")%></asp:Label>

 

 

 

 

i m calling a c# class to translate my text with the database text corresponding in the good language and it works good, i would like to do the same with columns in the aspx file not in code behind but this doesn't seems to work :

 

 

 

 

 

 

<telerik:GridBoundColumn DataField="LastName" FilterControlAltText="Filter column column"
  
HeaderText='<%= DatabaseResourceManager.Translate("5914/:Nom")%>' UniqueName="LastName">
  
</telerik:GridBoundColumn>

 

some help ?

[EDIT]
Ok I found a way to solve it (the night is good to think :-) )

<telerik:GridTemplateColumn>
     <HeaderTemplate>
           <asp:Label ID="clLblLastName" runat="server"><%= DatabaseResourceManager.Translate("5914/Nom") %></asp:Label
      </HeaderTemplate>
      <ItemTemplate>
            <asp:Label runat="server" ID="clTxtLastName" Text='<%# Eval("LastName") %>'></asp:Label>
       </ItemTemplate>
</telerik:GridTemplateColumn>
guillaume monore
Top achievements
Rank 1
 answered on 27 Apr 2011
1 answer
83 views
The Ribbonbar is a great control. One small UI request... I don't think there should be a line underneath selected tabs as can be seen in the attached screen capture
Simon
Telerik team
 answered on 27 Apr 2011
1 answer
85 views
I am using 2011 Q1 of ASP.NET Ajax tools. I have the following code within a RadListView control for data paging.

<table cellpadding="0" cellspacing="0" width="100%;" style="clear: both;">
    <tr>
        <td>
            <telerik:RadDataPager ID="RadDataPager2" runat="server" PagedControlID="RadListView1"
                PageSize="10">
                <Fields>
                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                    <telerik:RadDataPagerButtonField FieldType="Numeric" />
                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                    <telerik:RadDataPagerPageSizeField PageSizeText="Page size: " />
                    <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                        TextBoxWidth="15" />
                    <telerik:RadDataPagerTemplatePageField>
                        <PagerTemplate>
                            <div style="float: right">
                                <b>Items
                                    <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                    to
                                    <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                    of
                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                    <br />
                                </b>
                            </div>
                        </PagerTemplate>
                    </telerik:RadDataPagerTemplatePageField>
                </Fields>
            </telerik:RadDataPager>
        </td>
    </tr>
</table>

The layout works fine in Internet Explorer (9) and Firefox (4) (see datapager ie.png image) but the page x of x section wraps in Chrome (10) and Safari (5) (see datapager chrome.png).

Any ideas on how to fix this?

Thank you.
Galin
Telerik team
 answered on 27 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?