Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
31 views
We have encountered a problem with recurring scheduling entries. I am not sure if this is caused by a default value or is a limitation that cannot be overcome.
When entering repeating scheduler entries without an end date, it appears that there is a hard stop after 3000 occurrences. After the 3000th entry the next run date is basically empty and no further entries are in the scheduler. Our clients have  events that are recurring on an hourly basis, which would limit the availability of the recurring entry to only 125 days.  Is there a default setting I am missing? 
Peter
Telerik team
 answered on 02 Dec 2011
7 answers
271 views
Hi,

     I am using a RadPanel bar with three panel items. I want to load the controls dynamically in each panel item depends on the panel item expanded.  I have using the client side event  "onclientitemexpand" to generate the postback. In the client side function first i have used  the __doPostBack function to initiate the postback. When I am using __doPostBack the page will be refreshed so i move to  the following ajaxrequest function "$find("<%=ajaxmanager1.ClientID%>").ajaxRequest("PanelItem");.  But nothing will happened that is the page is not postbacked. I attach the code  below.


C#
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using Telerik.Web.UI;
using System.Web.UI.WebControls;
 
public partial class RadPanelDemo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
         
 
        CustomContentTemplate1 template1= new CustomContentTemplate1();
        CustomContentTemplate2 template2 = new CustomContentTemplate2();
 
        if (IsPostBack)
        {
            lblpost.Text = "OnPostBack";
        }
 
        foreach (RadPanelItem item in RadPanelBar1.Items)
        {
            if (IsPostBack)
            {
                Response.Write("post");
                item.ContentTemplate = new CustomContentTemplate2();
                template2.InstantiateIn(item);
                item.DataBind();
            }
            else
            {
                Response.Write("load");
                item.ContentTemplate = new CustomContentTemplate1();
                template1.InstantiateIn(item);
                item.DataBind();
            }
                         
        }
 
        ajaxmanager1.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(ajaxmanager1_AjaxRequest);
    }
 
    void ajaxmanager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        Response.Write(e.Argument);
    }
}
 
class CustomContentTemplate1 : ITemplate
{
    public void InstantiateIn(Control container)
    {
        Label label1 = new Label();
        label1.Font.Bold = true;
        label1.DataBinding += new EventHandler(label1_DataBinding);
        container.Controls.Add(label1);
    }
 
    private void label1_DataBinding(object sender, EventArgs e)
    {
        Label target = (Label)sender;
        RadPanelItem item = (RadPanelItem)target.BindingContainer;
        
        target.Text ="load";
        //Alternative way:
        //string itemText = (string)DataBinder.Eval(item, "Value"); target.Text = itemText;
    }
}
 
class CustomContentTemplate2 : ITemplate
{
    public void InstantiateIn(Control container)
    {
        Label label1 = new Label();
        label1.Font.Bold = true;
        label1.DataBinding += new EventHandler(label1_DataBinding);
        container.Controls.Add(label1);
    }
 
    private void label1_DataBinding(object sender, EventArgs e)
    {
        Label target = (Label)sender;
        RadPanelItem item = (RadPanelItem)target.BindingContainer;
        target.Text = "post";
        //Alternative way:
        //string itemText = (string)DataBinder.Eval(item, "Value"); target.Text = itemText;
    }
}
 
class CustomContentTemplate3 : ITemplate
{
    public void InstantiateIn(Control container)
    {
        Label label1 = new Label();
        label1.Font.Bold = true;
        label1.DataBinding += new EventHandler(label1_DataBinding);
        container.Controls.Add(label1);
    }
 
    private void label1_DataBinding(object sender, EventArgs e)
    {
        Label target = (Label)sender;
        RadPanelItem item = (RadPanelItem)target.BindingContainer;
        target.Text = item.Value;
        //Alternative way:
        //string itemText = (string)DataBinder.Eval(item, "Value"); target.Text = itemText;
    }
}
ASPX
 
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadPanelDemo.aspx.cs" Inherits="RadPanelDemo" %>
 
<%@ Register assembly="Telerik.Web.UI" 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>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript" language="javascript">
 
        function OnClientItemExpand(sender, args) {
 
            $find("<%=ajaxmanager1.ClientID%>").ajaxRequest("arguments");
     
            
        }      
    </script>
    </telerik:RadCodeBlock>
    </head>
<body>
 
    <form id="form1" runat="server">
    <telerik:RadAjaxManager ID="ajaxmanager1" runat="server" EnableAJAX="true" >
    <AjaxSettings >
        <telerik:AjaxSetting AjaxControlID="RadPanelBar1" >
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <table width="100%">
            <tr style="width:100%">
                <td style="width:100%">
               <%-- <telerik:RadAjaxPanel ID="panel1" runat="server" EnableAJAX="true" >--%>
                    <telerik:RadPanelBar ID="RadPanelBar1" onclientitemexpand="OnClientItemExpand"  ExpandMode="FullExpandedItem"   Width="100%" runat="server">
                        <Items>
                            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1" PostBack="true"  Value="A">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2" Value="B">
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Text="Root RadPanelItem3" Value="C">
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                   <%-- </telerik:RadAjaxPanel>--%>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="post" Text="PostBack" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblpost" Text="Load" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

Looking forward your reply.

Kind regards,
Velkumar.

Iana Tsolova
Telerik team
 answered on 02 Dec 2011
8 answers
263 views
Hello,

When I set ReadOnly=true on a RadNumericTextBox via markup, the client event OnFocus() does not fire.
<telerik:RadNumericTextBox CssClass="FarmSerialNumber" ID="rntbAcreageFarmSerialNumber"
    runat="server" Width="40px" Value='<%# DoubleFromDb(Eval("FarmSerialNumber"), true) %>'
    ReadOnly='<%# DoubleFromDb(Eval("FarmSerialNumber"), true) != null %>' MinValue="1">
    <NumberFormat DecimalDigits="0" GroupSeparator="" />
    <IncrementSettings InterceptMouseWheel="false" />
    <ReadOnlyStyle ForeColor="Gray"></ReadOnlyStyle>
    <ClientEvents OnValueChanged="radNumericTextBox_ClientValueChanged" OnFocus="acreageControl_ClientFocus" />
</telerik:RadNumericTextBox>

The documentation does not mention that this doesn't fire when it is readonly.
http://www.telerik.com/help/aspnet-ajax/input-client-side-onfocus.html

To ensure that this is not a problem with the <input> element, I added this and it works fine.
<input type="text" onfocus="alert('Yup.  Works')" readonly="readonly" />

Is this a bug or by design?

Thanks!
Thad
Vasil
Telerik team
 answered on 02 Dec 2011
9 answers
82 views
Hello,
I'm adding new node on client side. When users presses Escape key, I have to delete new node. How do I do that? NodeEdited event wont fire in this case.
3 years ago you promised here to implement this event but nothing has changed.
Thank you.
Plamen
Telerik team
 answered on 02 Dec 2011
1 answer
60 views

I am using the scrolling functionality of the grid in order to load more records if the user scrolls to the bottom of the page.I have taken the examples from the site and changed the data source.  Now when I scroll to the end the grid does not show the additional records.  In the code behind AjaxRequest I can see that the page size is increasing every time i reach the bottom of the page but no loader image shows up and the grid does not show the additional records.

Here is the code
Thank you

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
     RadGrid1.PageSize = 15 + RadGrid1.PageSize;
     RadGrid1.Rebind();
}
 
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
 
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script type="text/javascript">
          function HandleScrolling(e) {
              var grid = $find("<%=RadGrid1.ClientID %>");
              var scrollArea = document.getElementById("<%= RadGrid1.ClientID %>" + "_GridData");
              if (IsScrolledToBottom(scrollArea)) {
                  var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1);
                  //if the visible items are less than the entire record count      
                  //trigger an ajax request to increase them   
                  if (currentlyDisplayedRecords < 100)
                  { $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadMoreRecords"); }
              }
          }
          //calculate when the scroll bar is at the bottom   
          function IsScrolledToBottom(scrollArea) {
              var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;
              return currentPosition == scrollArea.scrollHeight;
          }
      </script>
    </telerik:RadCodeBlock>
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
          </UpdatedControls>
        </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="25">
      <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0;" />
    </telerik:RadAjaxLoadingPanel>
 
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"
      AllowSorting="True" AllowPaging="True" PageSize="15" Width="97%" GridLines="None">
       
      <PagerStyle Visible="False" />
       
      <MasterTableView Width="99%" TableLayout="Fixed" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
        DataSourceID="SqlDataSource1" PageSize="15">
      </MasterTableView>
       
      <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100px" />
        <ClientEvents OnScroll="HandleScrolling" />
      </ClientSettings>
    </telerik:RadGrid>
 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnection %>"
  SelectCommand="SELECT DisplayName FROM SP_Messages"></asp:SqlDataSource>
</asp:Content>

Mira
Telerik team
 answered on 02 Dec 2011
0 answers
53 views
Hi,

When I drag any images or any control onto the 'radupload' the path of the dragged images/control is being displaced as the path in the radupload control.

Can any one please help me on....

how to prevent the drag of images or any control on to the radupload control.


Thanks in advance !
Prasad
Top achievements
Rank 1
 asked on 02 Dec 2011
2 answers
109 views
Hi,

I have a question: the Radgrid is bound to wcf data service in the client-side. The data is displayed correctly. But when hit the Edit link, there is no response. I have set the EditMode to InPlace. My aspx code is as following:
<telerik:RadGrid ID="RadGrid1" runat="server" Width="700px" AllowSorting="true"   AllowPaging="true"
                 pagesize= "10"  AutoGenerateColumns="false"  OnItemCreated="g_ItemCreated"> 
    <MasterTableView   AllowNaturalSort="true" DataKeyNames="parm_id" AllowAutomaticUpdates="false" EditMode="InPlace" >
        <Columns>
             <telerik:GridBoundColumn DataField="id" UniqueName="ID" HeaderText="ID"
                ItemStyle-Width="200px" AllowSorting="true" ShowSortIcon="true" SortExpression="ID asc" ReadOnly="true" Display = "false"/>
            <telerik:GridBoundColumn DataField="name" UniqueName="Name" HeaderText="Name"
                ItemStyle-Width="200px" AllowSorting="true" ShowSortIcon="true" SortExpression="Name asc" ReadOnly="true"  />
             <telerik:GridNumericColumn                                      DataField="Score"                                      DataType="System.Int32"                                      HeaderText="Score"                                                                              UniqueName="Score"
                                   >                                               </telerik:GridNumericColumn>             <telerik:GridCheckBoxColumn UniqueName="ActiveFlag" HeaderText="Is Active" DataField = "active_flag" />             <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderText="">             </telerik:GridEditCommandColumn>         </Columns>     </MasterTableView>   <ClientSettings >         <ClientEvents OnDataBinding="OnDataBinding" OnRowDataBound="OnRowDataBound"   />         <DataBinding Location="WcfDataService1.svc"  >         <DataService TableName="Student"  />         </DataBinding>  </ClientSettings> </telerik:RadGrid>

Someone could help me? Thanks in advance.

Lynn
Top achievements
Rank 1
 answered on 02 Dec 2011
0 answers
37 views
Hi,
  I want to show the next available time slot to the user. I.e., If user enters start date time as 12-02-2011 :09:00:00 with the length of 30minutes, we have to find out the time slot available for the given date time with 30minutes length, if there is no time slot available at the given time we need to show the next available time slot it may be some other date or some other time but the next available time slot should be greater or equal to 30minutes length.
Maddela
Top achievements
Rank 1
 asked on 02 Dec 2011
9 answers
324 views
I am using Q3 2008 radmenu.

In the drop down menus, on the left, there is a spot there for if I want an image. I don't want an image, so how can I remove that extra space to the left of the text that is reserved for a menu image?

thanks.
Princy
Top achievements
Rank 2
 answered on 02 Dec 2011
1 answer
61 views
could anyone tell me how to set focus to radalert ok button on server side
Shinu
Top achievements
Rank 2
 answered on 02 Dec 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
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
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?