Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
102 views

Hi everyone,

 

I am using many RadDatePicker controls on the form that are customized to a month/year pickers with solution found here:

http://www.telerik.com/community/code-library/submission/b311D-mdkhb.aspx

 

Because of performance issue I have to use shared calendar for all date pickers on the form. When I set SharedCalendarID property for each RadDatePicker there is a problem.

No matter witch picker I set date on it sets date on one picker only.

 

Here is my simple web page:   

<%@ Page Language="C#" AutoEventWireup="true" Culture="en-US" CodeFile="Default.aspx.cs" 
    Inherits="_Default" %> 
 
<%@ 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"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
       <br /> 
       <br /> 
    <div> 
 
        <script type="text/javascript">  
            //override the onload event handler to change the picker after the page is loaded  
            window.onload = function()  
            {  
               window.setTimeout(function() {setCalendars();}, 200)    
            }  
              
            function setCalendars()  
            {  
               setCalendarTable($find("<%= RadDatePicker1.ClientID %>"));  
               setCalendarTable($find("<%= RadDatePicker2.ClientID %>"));  
            }     
 
            function setCalendarTable(picker)  
            {  
 
                var calendar = picker.get_calendar();  
                var fastNavigation = calendar._getFastNavigation();  
 
                $clearHandlers(picker.get_popupButton());  
                $addHandler(picker.get_popupButton(), "click", function()  
                {  
                    var textbox = picker.get_textBox();  
                    //adjust where to show the popup table   
                    var x, y;  
                    var adjustElement = textbox;  
                    if (textbox.style.display == "none")  
                        adjustElement = picker.get_popupImage();  
 
                    var pos = picker.getElementPosition(adjustElement);  
                    x = pos.x;  
                    y = pos.y + adjustElement.offsetHeight;  
 
                    var e = {  
                        clientX: x,  
                        clientY: y  
                    };  
                    //synchronize the input date if set with the picker one  
                    var date = picker.get_selectedDate();  
                    if (date)  
                    {  
                        calendar.get_focusedDate()[0] = date.getFullYear();  
                        calendar.get_focusedDate()[1] = date.getMonth() + 1;  
                    }  
 
                    $get(calendar._titleID).onclick(e);  
                });  
 
                fastNavigation.OnOK =  
                    function()  
                    {  
                        var date = new Date(fastNavigation.Year, fastNavigation.Month, 1);  
                        picker.get_dateInput().set_selectedDate(date);  
                        fastNavigation.Popup.Hide();  
                    }  
 
 
                fastNavigation.OnToday =  
                    function()  
                    {  
                        var date = new Date();  
                        picker.get_dateInput().set_selectedDate(date);  
                        fastNavigation.Popup.Hide();  
                    }  
            }     
        </script> 
 
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server" SharedCalendarID="sharedCalendar">  
            <DateInput DateFormat="MMMM yyyy" runat="server">  
            </DateInput> 
            <Calendar ID="Calendar1" runat="server" > 
            </Calendar> 
        </telerik:RadDatePicker> 
        <telerik:RadDatePicker ID="RadDatePicker2" runat="server" SharedCalendarID="sharedCalendar">  
            <DateInput DateFormat="MMMM yyyy" runat="server">  
            </DateInput> 
            <Calendar ID="Calendar2" runat="server" > 
            </Calendar> 
        </telerik:RadDatePicker> 
        <telerik:RadCalendar runat="server" ID="sharedCalendar" Width="100px">  
          </telerik:RadCalendar> 
          
    </div> 
    </form> 
</body> 
</html> 

I am using 2008.1.515.20 version of RadDatePicker control.

Please help me to fix/solve this.

Thanks in advance,

 

Igor.

Martin
Telerik team
 answered on 21 Aug 2009
2 answers
66 views
Hi,

What is the equivalent code for RAD Date Picker 'AJAX' Date Input control of the below event which is the RAD Date Picker 'Classic' control javascript event. I'm upgrading the RAD Controls from Q3 2007 version to Q2 2009 release.

        function OnDateError(sender, args)   
        {   
            if (args.Reason == RadInputErrorReason.ParseError)   
            {   
                alert(args.InputText + " is an incorrect date format.\n\nThe format must be: MM/DD/YYYY");    
            }   
            else if (args.Reason == RadInputErrorReason.OutOfRange)   
            {   
                alert("The date is out of range");   
            }   
             
            sender.Clear(); 
            sender.Focus(); 
             
            event.cancelBubble=true; 
        }   

Thanks in advance.
Meenakshi Nagalingam
Top achievements
Rank 1
 answered on 21 Aug 2009
1 answer
216 views
On a deadline, very urgent...

I have a RadEditor on an ASP.NET 2.0 Website project that I've created.  It displays correctly on my local box.  When uploaded to the dev server, however, the RadEditor and RadWindow do not show/work.  I can't attach a file to this, it seems, so here's a link to the screenshot of the problem.

It also looks like it's messed up my ASP.NET 2.0 menu control as well... or there's a larger issue here.

The dev server is running IIS 6, and the web app set up on it for this website is set to ASP.NET 2.0.

I've tried the various recommendations for the web.config but none of them have worked.  Here's my current web.config:

<?

 

xml version="1.0"?>

 

<!--

 

 

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<

 

configuration>

 

<

 

configSections>

 

<

 

sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

 

<

 

sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

 

<

 

section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

 

<

 

sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

 

<

 

section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>

 

<

 

section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

 

<

 

section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

sectionGroup>

 

</

 

configSections>

 

<

 

appSettings>

 

<

 

add key="net.interfax.ws.dfs" value="http://ws.interfax.net/dfs.asmx"/>

 

</

 

appSettings>

 

<

 

connectionStrings>

 

<

 

add name="connstring [info removed ] providerName="System.Data.SqlClient"/>

 

</

 

connectionStrings>

 

<

 

system.web>

 

<!--

 

 

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

 

 

-->

 

<

 

pages>

 

<

 

namespaces>

 

<

 

clear/>

 

<

 

add namespace="System"/>

 

<

 

add namespace="System.Collections"/>

 

<

 

add namespace="System.Collections.Generic"/>

 

<

 

add namespace="System.Collections.Specialized"/>

 

<

 

add namespace="System.Configuration"/>

 

<

 

add namespace="System.Text"/>

 

<

 

add namespace="System.Text.RegularExpressions"/>

 

<

 

add namespace="System.Web"/>

 

<

 

add namespace="System.Web.Caching"/>

 

<

 

add namespace="System.Web.SessionState"/>

 

<

 

add namespace="System.Web.Security"/>

 

<

 

add namespace="System.Web.Profile"/>

 

<

 

add namespace="System.Web.UI"/>

 

<

 

add namespace="System.Web.UI.WebControls"/>

 

<

 

add namespace="System.Web.UI.WebControls.WebParts"/>

 

<

 

add namespace="System.Web.UI.HtmlControls"/>

 

</

 

namespaces>

 

<

 

controls>

 

<

 

add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

</

 

controls>

 

</

 

pages>

 

<

 

sessionState timeout="120"></sessionState>

 

<!--

 

 

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

 

 

-->

 

<

 

compilation debug="true">

 

<

 

assemblies>

 

<

 

add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

<

 

add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

 

<

 

add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

 

<

 

add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

 

</

 

assemblies>

 

</

 

compilation>

 

<

 

httpHandlers>

 

<

 

remove verb="*" path="*.asmx"/>

 

<

 

add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

<

 

add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

<

 

add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

 

<

 

add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.1.515.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />

 

</

 

httpHandlers>

 

<

 

httpModules>

 

<

 

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

</

 

httpModules>

 

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

 

 

-->

 

<

 

authentication mode="Windows"/>

 

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

 

 

-->

 

</

 

system.web>

 

<

 

system.webServer>

 

<

 

validation validateIntegratedModeConfiguration="false"/>

 

<

 

modules>

 

<

 

add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

</

 

modules>

 

<

 

handlers>

 

<

 

remove name="WebServiceHandlerFactory-Integrated"/>

 

<

 

add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

<

 

add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

<

 

add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

</

 

handlers>

 

</

 

system.webServer>

 

</

 

configuration>

 

Rumen
Telerik team
 answered on 21 Aug 2009
1 answer
67 views

Error:

'addEventListner' is null or not an object

 inside onload method:

 

 

panel.ID =

"Panel1";

 

 

this.Controls.Add(panel);

 

RadComboBox cbxName =

new RadComboBox();

 

 

 

cbxName.ID =

"cbxName";

 

cbxName.ItemsRequested +=

new RadComboBoxItemsRequestedEventHandler(cbxName_ItemsRequested);

 

cbxName.Skin = Skin;

 

 

 

panel.Controls.Add(cbxName);

 


RadAjaxManager

 

ajaxManager = RadAjaxManager.GetCurrent(this.Page);

 

 

if (ajaxManager == null)

 

{

ajaxManager =

new RadAjaxManager();

 

ajaxManager.ID =

"RadAjaxManager1";

 

Controls.Add(ajaxManager);

 

this.Page.Items.Add(typeof(RadAjaxManager), ajaxManager);

 

}

 

ajaxManager.AjaxSettings.AddAjaxSetting(cbxName, panel);

 

 

 


private

 

DataTable GetData(string text, string connString)

 

{

 

using (SqlConnection conn = new SqlConnection(connectionString))

 

{

conn.Open();

 

using (SqlCommand command = new SqlCommand("mystoredproc", conn))

 

{

command.CommandType =

CommandType.StoredProcedure;

 

command.Parameters.Add(

new SqlParameter("@paramName", text));

 

 

SqlDataAdapter adapter = new SqlDataAdapter(command);

 

 

DataTable data = new DataTable();

 

adapter.Fill(data);

 

return data;

 

}

}

}



 

protected

 

void cbxName_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)

 

{

 

try

 

 

 

 

{

 

int itemsPerRequest = 10;

 

 

if (e.Text.Length >= 3)

 

{

 

DataTable table = GetData(e.Text, connectionString);

 

 

int itemOffset = e.NumberOfItems;

 

 

int endOffset = Math.Min(itemOffset + itemsPerRequest, table.Rows.Count);

 

e.EndOfItems = endOffset == table.Rows.Count;

 

for (int i = itemOffset; i < endOffset; i++)

 

{

cbxName.Items.Add(

new RadComboBoxItem(table.Rows[i]["Name"].ToString(), table.Rows[i]["ID"].ToString()));

 

}

 

}

 

else

 

 

 

 

{

cbxName.Items.Clear();

}

}

 

catch (Exception ex)

 

{

 

throw ex;

 

}

}

Helen
Telerik team
 answered on 21 Aug 2009
1 answer
147 views
In the Image Manager JavaScript Function there are 2 parameters sender and args.
I debugged the args parameter and it contains the following:
1- CurrentDirectory.
2-Result.
3-SelectedItem.

I want to get the inserted image height and width, so I looked for this property or attribute in the above three elements I found Result has a property named height and property named width,
But the problem is it always return 0.

Please advise,

Thank you,
Amr Saafan
Senior Software Developer
http://amrsaafan.blogspot.com
http://groups.yahoo.com/group/Developers_For_Ever
Rumen
Telerik team
 answered on 21 Aug 2009
2 answers
188 views
Hi,

I'm trying to enable intelligent labels on my chart.  The X-Axis represents time (OA Date), the Y-Axis represents rate and features numbers in the 15000 - 40000 range.  I'm binding about 100 items to this chart.

With intelligent labels toggled off the chart renders fine but the visible labels are out of control.  When I attempt to enable intelligent labels my ASPNET process skyrockets to 50-60% CPU and just sits there until the request times out.

Any suggestions on what I can do to try and fix this?

Telerik Version: 2009.1.527.35

Thanks
Kevin Schneider
Top achievements
Rank 1
 answered on 21 Aug 2009
3 answers
113 views
Hi, I started to use the Scheduler WebService, and there is a problem, response changing Culture to en-US and timezone to GMT-08:00. Any idea?
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="100%" Height="575px"
            Skin="Office2007" DataKeyField="JOB_EVENT_ID" DataSubjectField="SUBJECT" DataStartField="EVENT_START"
            DataEndField="EVENT_END" TimeZoneOffset="00:00:00" OverflowBehavior="Scroll" StartEditingInAdvancedForm="false"
             TimelineView-NumberOfSlots="14"  DayStartTime="00:00:00" DayEndTime="00:00:00" WorkDayStartTime="10:00:00" WorkDayEndTime="19:00:00"
              DayHeaderDateFormat="dd/MM/yy" WeekHeaderDateFormat="dd/MM/yy" SelectedView="WeekView" FirstDayOfWeek="Monday"
               LastDayOfWeek="Sunday"              
            Culture="ru-RU" DisplayDeleteConfirmation="false" OnClientAppointmentsPopulating="AppointmentsPopulating"                
            OnClientAppointmentCreated="AppointmentCreated"  EnableTheming="false" EnableViewState="false" EnableRecurrenceSupport="false"
            >
            <WebServiceSettings Path="CalendarWebService.asmx" />
        </telerik:RadScheduler>  

Peter
Telerik team
 answered on 21 Aug 2009
3 answers
105 views
Hi

My scheduler is use for view only, I have a separate edit form to populate with data. (There are business reasons for this)

What I'd like to be able to do is on edit load the form with the appointment data. Ideally I'd like a pop up edit icon along the lines on the delete, if this is not possible what event so I need to hook into to capture the built in double click edit and load my form.

Andy
Peter
Telerik team
 answered on 21 Aug 2009
1 answer
108 views
Hello,

I use the following RadPanelBar definition within my master page:

     <telerik:radpanelbar runat="server" ID="RadPanelbar1" ExpandMode="MultipleExpandedItems" ExpandDelay="3000" CollapseDelay="3000" EnableEmbeddedSkins="false" Skin="SoEasy" DataSourceId="QuickLaunchSiteMap" OnClientLoad="panelLoad" OnClientItemClicking="OnClientItemClickingHandler" OnClientMouseOver="OnClientMouseOverPanHandler" OnPreRender="RadControl_PreRender" PersistStateInCookie="false" ToolTip="">
      <ExpandAnimation Type="Linear" Duration="300" />
      <CollapseAnimation Type="Linear" Duration="100" />     
     </telerik:radpanelbar></div>

I have a multi-level panelbar that expands and collapses during the OnClientMouseOver event.  Unfortunately, I cannot control the timing.  The items expand and collapse instantly as the mouse passes over each option.

What am I missing?

Thank you,

Doug
Paul
Telerik team
 answered on 21 Aug 2009
1 answer
150 views
I have a radwindow that if the program idols for like an hour and then if you open a rad window the icons do not appear. If you hover your mouse over where the icons should be the tool tip appears and if you click in that spot it will close, maximize, etc. I thought it is that my sessions state has timed out but I have it set for 3 hours before it times out. I am using IE7 for the application and the only issue I saw with this is when other people were using IE6. Is there a setting for the rad window that I need to set so the icons appear when the application has been idol for an hour to make sure the icons appear?
Georgi Tunev
Telerik team
 answered on 21 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?