Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
339 views
I am looking to use the RadWindow as a progress / operation complete window for bulk operations on items in a RadGrid.  I am running into challenges keeping the window up after the operation and communicating with it without the window closing after the operation is complete.  Here's a small sample of the main page:

<%@ Page Language="C#" AutoEventWireup="true" Async="true" %> 
 
<%@ Import Namespace="System.Runtime.Remoting.Messaging" %> 
<%@ Import Namespace="System.Threading" %> 
<!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">  
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" /> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="ScriptManager" runat="server">  
        <Scripts> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
        </Scripts> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="AjaxManager" runat="server" /> 
    <telerik:RadWindowManager ID="WindowManager" runat="server">  
        <Windows> 
            <telerik:RadWindow ID="Progress" runat="server" Behaviors="Move, Resize" Modal="true" 
                Title="Operation Progress" VisibleStatusbar="false" /> 
        </Windows> 
    </telerik:RadWindowManager> 
    <telerik:RadCodeBlock ID="CodeBlock" runat="server">  
 
        <script type="text/javascript">  
            function UpdateProgress(success, value)  
            {  
                GetRadWindowManager().getWindowByName('Progress'); oWnd.get_contentFrame().contentWindow.DisplayResults(success, value);  
            }  
        </script> 
 
    </telerik:RadCodeBlock> 
    <asp:UpdatePanel ID="Panel1" runat="server">  
        <ContentTemplate> 
            <asp:Button ID="Submit" runat="server" Text="Do a Long-Running Operation" OnClick="Submit_Click" 
                OnClientClick="window.radopen('Progress.aspx', 'Progress');" /> 
        </ContentTemplate> 
        <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="Submit" EventName="Click" /> 
        </Triggers> 
    </asp:UpdatePanel> 
    </form> 
</body> 
</html> 
 
<script runat="server">  
    private void LongRunningMethod(string name)  
    {  
        Thread.Sleep(5000);  
    }  
 
    private delegate void LongRun(string name);  
 
    protected void Submit_Click(object sender, EventArgs e)  
    {  
        PageAsyncTask task = new PageAsyncTask(  
            delegate(Object source, EventArgs ea, AsyncCallback callback, Object state)  
            {  
                return (new LongRun(LongRunningMethod)).BeginInvoke("Sleep", callback, state);  
            },  
            delegate(IAsyncResult ar)  
            {  
                ((LongRun)((AsyncResult)ar).AsyncDelegate).EndInvoke(ar);  
 
                Page.ClientScript.RegisterStartupScript(this.GetType(),  
                    "UpdateProgressDialog",  
                    @"UpdateProgress(true, 'test worked, click close to refresh the page');", true);  
            }, null, null);  
 
        Page.RegisterAsyncTask(task);  
    }  
</script> 
 
 

Here is what the progress dialog looks like:

<%@ Page Language="C#" AutoEventWireup="true" %> 
 
<!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">  
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="ScriptManager" runat="server">  
        <Scripts> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
        </Scripts> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="AjaxManager" runat="server" /> 
    <asp:Panel ID="ProcessingRequest" runat="server">  
        Processing Your Request  
        <img alt="Please Wait..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading4.gif") %>' /> 
    </asp:Panel> 
    <asp:Panel ID="Success" runat="server" Visible="false">  
        Operation was a success!  
        <ul> 
            <li>Messages</li> 
        </ul> 
        <a href="#">Close</a> 
    </asp:Panel> 
 
    <script type="text/javascript">  
        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 DisplayResults(success, value)  
        {  
            // TODO: Hide please wait section  
            if (success)  
            {  
                // TODO: Show success section  
                // TODO: Bind results list to bullet list  
            }  
            else  
            {  
                // TODO: Show failure section  
                // TODO: Bind results list to bullet list  
            }  
 
            alert('hello ' + value);  
        }  
    </script> 
 
    </form> 
</body> 
</html> 
 


Any thoughts on where to go from here? My first challenge is that GetRadWindowManager() is undefined when the operation tries to complete the callback.
ColinBowern
Top achievements
Rank 1
 answered on 21 Jul 2009
2 answers
174 views
I am using the scheduler control for Day and Time selection, the user can select timespan on days of week for which a particular activity will be performed. To achieve this, my rad schedule tag is as follows:

<telerik:RadScheduler runat="server" ID="rdsTimeSelection"
            Width="900px" EnableEmbeddedSkins="True" SelectedView="WeekView"
            DayStartTime="00:00:00" DayEndTime="23:59:59" ShowAllDayRow="true"
                AllowEdit="true" AllowInsert="true" WorkDayStartTime="00:00:00"
                WorkDayEndTime="23:59:59"  ShowHeader="False" DataEndField="End"
                DataKeyField="ID" DataStartField="Start" DataSubjectField="Subject"
                FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" MinutesPerRow="60"
                OverflowBehavior="Expand" ShowFooter="False" ShowFullTime="True"
                ShowMonthlyColumnHeader="False" ShowNavigationPane="False"
                ShowResourceHeaders="False" ShowViewTabs="False"
                StartEditingInAdvancedForm="False" TimeLabelRowSpan="1">
                <MonthView ShowDateHeaders="False" ShowResourceHeaders="False" />
                <WeekView ColumnHeaderDateFormat="ddd" HeaderDateFormat="ddd" />
        </telerik:RadScheduler>

This works great, but now the users want to selected a timespan across multiple days by clicking and dragging across the scheduler. They dont want to have to create the same appointment over and over for multiple days. Is it possible with rad scheduler?
Kevin
Top achievements
Rank 1
 answered on 21 Jul 2009
4 answers
409 views
浏览在线示例“RadRotator for ASP.NET AJAX”的时候,当我使用的是IE7、8浏览器时,都出现了JavaScript脚本错误:“Error:'style.getPropertyValue' 为空或不是对象”,以至于不能显示RadRotator。
而使用FireFox却可以正常浏览。
同时,在这里发帖提问,也只能使用FireFox浏览器。使用IE依旧有这样的脚本错误。

困惑中。

------------------------------------------------------
my English is poor ,sorry.
my main mean is when I browse the live demo about "RadRotator for ASP.NET AJAX", under IE7, IE 8. there are appear JavaScript error:“Error:'style.getPropertyValue' is null or is not object ..”,so that, the browser can not show RadRotator control.
But it is OK under Firefox !

and there also has the same problem in the "New Thread ". so I just only use Firefox to write down my questions .

I'm in trouble.

-----------------------------------------

my system : WIN XP PRO SP3, IE 7,8, visual  studio 2008. (two computers have the same problem )

------

just now , I browse under WIN SERVER 2003 R2, IE 7,8 , it is ok.

may be there are some questions setting in the other computers ? how to solve ...

I'm in trouble terrible


---------------------

for example , when I browse the demo:"http://demos.telerik.com/aspnet-ajax/rotator/examples/default/defaultcs.aspx"
IE JavaScript ERROR :
网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; CIBA)
时间戳: Thu, 16 Jul 2009 02:15:04 UTC


消息: 'style.getPropertyValue' 为空或不是对象
行: 122
字符: 4
代码: 0
URI: http://demos.telerik.com/aspnet-ajax/ScriptResource.axd?d=9szplkJlpH59_Agb8Dqfjm-R70A7ZI2COBWbC8MhcHMUu3FkRyW1QHMKJS3e37kP0&t=2f70f01f



zz zz
Top achievements
Rank 1
 answered on 21 Jul 2009
1 answer
119 views
I'm having a problem with the navigation functionality of the RadScheduler.  I'm using Q1 2009 SP2 (version 2009.1.527).

I have been using the scheduler on my site for many months now without problems.  However, I have recently changed the site by placing the RadScheduler into a custom web user control.  This user control is dynamically loaded when the user clicks a node in a RadTreeView.  So the 2 changes are that the scheduler is in a user control and the user control is dynamically loaded.

The initial load of the user control works correctly.  The problem occurrs when I use the left and right arrows in the navigation panel to go to different months.  I am unable to get more than 1 month away from the current month.  So for example, if the current month is July, I can click the right arrow to go to August, but clicking the right arrow again only reloads August instead of going to September.  Interestingly, this issue does not occurr if I use the pop up RadCalendar for navigation.

Also, I should mention that I'm using the VisibleRangeStart and VisibleRangeEnd properties to only load the "in view" appointments.  By tracing through the code, I can see that properties do not have the correct values when I use the left and right arrows for navigation.

Any thoughts on how to fix this?  I think the problem may be that the RadScheduler's ViewState is not being preserved properly.
Justin
Top achievements
Rank 1
 answered on 20 Jul 2009
4 answers
520 views
Hello-

I'm working on a page that has a regular calendar control, i bind "selectedDays" to a database and show these days with an offset background color.  This tells the user that a record exists on that day.  My next step is for the user to then click that date and in a RadDataGrid show all the records for that day.

At this time when i click a highlighted date that i know has a record, it will only show a matching record if it has a Date and Time stamp of 12:00:00 attached to it.  However the database has DateTime for when the record was created by the user.

Basically i want the SQL statement triggered by the SelectedDate property of the Calendar control to only send the format Month,Day,Year.  I'm not sure how i can control this.

At this time, my code is inline for the clicking of the date to populate the RadGrid.  The only codebehind is the code that displays the different background for SelectedDates with a record(s).
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:LionsConnectionString %>" 
        SelectCommand="SELECT ArticleID, ArticleTitle, ArticleSubject, ArticleContent, ArticleDateTime, ArticleExp, ArticleExpChkBox, UserID, UserName FROM tblLionsArticles WHERE ((ArticleDateTime) = @ArticleDateTime)">  
        <SelectParameters> 
            <asp:ControlParameter ControlID="RadDatePicker1" DefaultValue="1/1/2008" Name="ArticleDateTime" 
                PropertyName="SelectedDate" /> 
        </SelectParameters> 
    </asp:SqlDataSource> 
    <div id="output" class="module" style="overflow: auto; float: right; width: 256px;  
        height: 240px; margin-right: 0px; color: #ff0000; padding: 5px 5px 5px 5px;"> 
    </div> 
    <div style="padding-left: 5px">  
        <telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Arial,Verdana,Tahoma" 
            ForeColor="Black" Style="border-color: #ececec" EnableMultiSelect="False" Skin="Black" 
            ViewSelectorText="x" OnDayRender="RadCalendar1_DayRender" AutoPostBack="True" 
            EnableViewSelector="true" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
            ShowOtherMonthsDays="False">  
            <ClientEvents OnDateClick="Calendar_OnDateClick2" /> 
            <SpecialDays> 
                <telerik:RadCalendarDay IsSelected="true" Repeatable="Today" Date="" ItemStyle-CssClass="rcToday">  
                    <ItemStyle CssClass="rcToday"></ItemStyle> 
                </telerik:RadCalendarDay> 
            </SpecialDays> 
        </telerik:RadCalendar> 

Thank you!

ManniAT
Top achievements
Rank 2
 answered on 20 Jul 2009
3 answers
126 views
Hi experts,

I need to be able to swap the text on menu and sub menu buttons according to the language that is
set in a session variable(for example) . What would be the best way to approach this? EG with the text variants 
in a database table or xml file.

Does anyone have any experience of this?

Thanks for an advice!

Clive

Clive Hoggar
Top achievements
Rank 1
 answered on 20 Jul 2009
1 answer
86 views
Hi,

I have a RadGrid in which all rows are in edit mode, like in this example:
http://www.telerik.com/help/aspnet-ajax/grdputallitemsineditmodenoadditionalrebind.html

In the grid I have 7 columns containing checkboxes, 1 RadCombo, 1 RadNumericInput and 4 RadTextBoxes.
This is because the user should edit all rows and then press save to update everything. The number of rows that are edited is variable. The performance of this application gets progressively worse when there are more rows.

For instance, with 90 rows, after the page is loaded on the client side, there is initially an empty radgrid.
It then takes 20 seconds in FF and about 40 seconds in IE before the textboxes and checkboxes are rendered.

We have a RadFormDecorator, but every time you hover your mouse over a checkbox or click it, it takes about 3 seconds before this has any visual effect. We put checkboxes in the ControlsToSkip property of the decorator, which improved the performance significantly in FireFox.

In IE however, we still suffer from very long mouse action response times. Usually IE will stop responding altogether and we need to kill the process.

This is on a machine with dual core 2.53 GHz processors and 4GB RAM. I've tested on other machines as well with similar results.

Has anyone experienced similar problems with editing all rows in a grid? And more importantly, does anyone have any suggestions on how to solve this?

Thanks,
Jaap
Georgi Krustev
Telerik team
 answered on 20 Jul 2009
0 answers
60 views
Hi,

I am facing an issue due to unavailability of RadAjaxServiceManager in the latest release 2009.2 build 701

I went through a few posts which states the same issue, i tried fixing the error by including ScriptManagerProxy in my page and including service reference path as shown below:

<asp:ScriptManagerProxy ID="m_UIKeyInfoAjax" runat="server">
<Services>
    <asp:ServiceReference Path="~/WebServices/Framework/KeyInfo/NewRequests.asmx" />
    <asp:ServiceReference Path="~/WebServices/Framework/KeyInfo/UpcomingInterviews.asmx" />
</Services>
</asp:ScriptManagerProxy>

Also in the Web servce file, i had included the following tag to make the webservice, a script callable one:

[System.Web.Script.Services.ScriptService]

However it has not solved my issue as the data which would be populated through a web method in the web service is not being displayed in my page.

We were not facing this issue earlier when the RadAjaxServiceManager class was available.

Please help me out to solve this issue.

Regards,
Damodar



Damodaran Mahadevan
Top achievements
Rank 1
 asked on 20 Jul 2009
0 answers
65 views
Hi Team,

Installation of RadControls for ASPNET AJAX Q1 2009 failed to add the controls in Visual Studio 2005 (.Net Framework 2.0) toolbox. I tried to install the controls using "ToolBoxInstaller.exe" utility, it is throwing the following error..

There was an error loading types from assembly 
'C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2009\Bin\Telerik.Web.UI.dll''Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'
Note: But the controls were loaded successfully in Visual Studio 2008 (.Net Framework 3.5) IDE toolbox.

Does anyone have answer for my issue?

Thanks in advance
Viswa
Viswanathan
Top achievements
Rank 1
 asked on 20 Jul 2009
4 answers
289 views
Hi there

I'm reading about 40 dates from a database table and I would like to automatically select these dates in a radcalendar.  I want the user to the de-select any days that were automatically selected, or add new days by selected them.

Here's a simple demonstration of what my code looks like using a simple loop to select days 23, 24 and 25.

 

Dim i As Integer

 

 

For i = 23 To 25

 

 

Dim NewDay As New Telerik.Web.UI.RadCalendarDay(RadCalendar1)

 

NewDay.Date =

New DateTime(2009, 7, i)

 

RadCalendar1.RangeMinDate = DateTime.Now

RadCalendar1.SpecialDays.Add(NewDay)

RadCalendar1.SpecialDays(NewDay).IsSelectable =

True

 

RadCalendar1.SpecialDays(NewDay).IsSelected =

True 

 

RadCalendar1.SpecialDays(NewDay).ItemStyle.BackColor = Drawing.Color.Red

 

 

Next

When I do this, the calendar actually highlights the special days in red.  But for some reason the IsSelected=True property is ignored.  I do however think that the days are selected because when I run the mouse over them they change color to the mouse-over color.  However, when I submit the calendar, NO DATES are coming up in my list of selected dates.  I have to physically click each day myself and then submit before they come up.

How would I automatically select several dates and highlight them in the radcalendar and then allow the user to de-select or select more dates.  I then want to a)  clear all previously stored special days in the database and b) post all selected dates to the database table.

Thanks
D.

 

ManniAT
Top achievements
Rank 2
 answered on 20 Jul 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?