Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
155 views
hello,
    I have an iframe and a radwindow on my page,when I drag the window, the content within iframe became invisiable until I drop the window, it confuse me a lot. 


    
<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" 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" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <iframe src="http://www.telerik.com" width="600px" height="400px"></iframe>
    </div>
    <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="True">
    </telerik:RadWindow>
    </form>
Princy
Top achievements
Rank 2
 answered on 27 Mar 2012
1 answer
91 views
I am having problems locating controls in Advanced Insert Template using regular document.getElementById. Basically I have 2 dropdowns on my AdvancedInsertTemplate form and after a user selects something in first dropdown I need javascript to change the selection of the 2nd dropdown. How can this be accomplished? Thanks
Plamen
Telerik team
 answered on 27 Mar 2012
2 answers
276 views
Hi Telerik team,

I'm facing a problem with the raddatepicker, raddatetimepicker and radtimepicker controls in your recent release 2012.1.215.35. With release 2011.3.1305.35 there was no such problem.

Please take a look at this page: http://www.sabiotec.de/Telerik/datepicker.aspx. I hope this page helps to clearify the issue.

I implemented a custom date picker control which inherits from your raddatepicker. The intention is to provide a set of keyboard shortcuts in order to easily change the selecte date. I.e., when the user focuses the date picker control and presses the "v" key, the previous day is set, pressing the "n" key sets the next day, pressing "h" sets the current day and so forth. I use javascript code to determine the appropriate date value and set it using the set_selectedDate() method.

This works fine. The problem is that after setting the date value, it is displayed in the wrong format, and I don't konw how to change this format (I tried "DateFormat", "DisplayDateFormat", "Culture", but to no avail).

For instance, without being focused the date is displayed correctly in German format, like "23.03.2012". After focusing the picker control and pressing the "v" key (which sets the previous day), the date is displayed like "2012-03-22-00-00-00". When the picker control looses the focus, the date is displayed correctly again like "22.03.2012".

The problem becomes more severe for the radtimepicker control, which indicates an error after setting the date value (because on invalid data input).

Thank your for your assistance!
Roland
Roland Klug
Top achievements
Rank 1
 answered on 27 Mar 2012
3 answers
191 views
Hi Telerik Team,

My RadGrid have 5 columns ( 4 GridBoundColumn, 1 template column with RadComboBox control).
I change page size of my RadGrid to 2k records anh it's too slow to render my Radgird.

View source of the page, each RadComboBox will be added a script bellow:

Sys.Application.add_init(function() 
$create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_height":0,"_isAspNet35":true,"_skin":"Web20","_uniqueId":"rdgDemo1$ctl00$ctl200$txtProjectPaid_20101","clientStateFieldID":"rdgDemo1_ctl00_ctl200_txtProjectPaid_20101_ClientState","collapseAnimation":"{\"duration\":450}","expandAnimation":"{\"duration\":450}","itemData":[]}, null, null, $get("rdgDemo1_ctl00_ctl200_txtProjectPaid_20101"));
});

So, if my radgrid have 2k records, my page will have 2k above script.  It's very slow....

Could you give me any solutions to solve this?

Thanks!
Dimitar Terziev
Telerik team
 answered on 27 Mar 2012
1 answer
103 views
Hello,
I have set the height of radDock using $telerik.getViewPortSize() in JavaScript since the height of rad dock is not occupying the height of form. I cannot hard Code the height since it is not compatible on changing screen resolution. Everything works fine expect for on IE7. It causes some unpleasant UI effects which can be observed in the attached file. I have added a div around the Rad Dock Layout which surrounds the Rad dock and finally the rad grid. My main target is to provide full length to rad dock to capture the whole screen. Providing height in percentage was also not suitable. How can these components be rectified? Thanks in advance.
Bozhidar
Telerik team
 answered on 27 Mar 2012
1 answer
221 views
I am using RadControls for ASP.NET AJAX Q1 2012 in my current project.

I have a web page which has a RadNumericTextBox  as follows:

<telerik:RadNumericTextBox ID="rntbInitialLevel" MaxLength="4" MinValue="0" MaxValue="100" Type="Number" Width="35" runat="server">
    <NumberFormat DecimalDigits="1" />
</telerik:RadNumericTextBox>

The valid value that can be entered on the RadNumericTextBox ranges from 0.10 to 100.0.

I would like to disallow the user from entering a blank, "0", "00", "000", "0000", "0.0", "0.00", "00.0"

Can you please show me how to do this?

Thanks,
Herman
Shinu
Top achievements
Rank 2
 answered on 27 Mar 2012
2 answers
143 views
Hi,

I wonder if RadStyleSheetManger could combine css files for non-RadControl pages?

Also, Could we use RadStyleSheetManager work with the App_Themes folder ( the ASP.NET folder for .skin)?

Thanks

Ping
Johnnelvine
Top achievements
Rank 1
 answered on 27 Mar 2012
1 answer
88 views
I have 2 radtreeview controls in a site, and want to copy one node the other tree control by drag/drop functionality but the source node is being deleted from the source node (cut/paste), I want to emulate the copy functionality, without deleting the node form the source.
Thanks in advance for the help.
Princy
Top achievements
Rank 2
 answered on 27 Mar 2012
1 answer
123 views
Hi,

i have a problem with the listview update function.
I'm using the CRUD Operations for the update.

My database looks something like:
fk1
fk2
id
...
...

fk1,fk2 and id are part of the primary key.

My listview can update every column, except columns belonging to the pk. Is this intended or am i doing something wrong?

Greetings

PS: I'm using a linqdatasource.


Antonio Stoilkov
Telerik team
 answered on 27 Mar 2012
4 answers
229 views
We are using RadScheduler and RadAjaxManager and it works for the first AJAX request (eg, change month) but the second request does nothing, no error message, no change to display at all.

This is a little complex to explain but the specifics of the problem are that the website it is used on is a content management system that does not have actual ASPX pages for content pages, instead it uses ASP.NET 4.0 page routing. A routing rule sends the page request to a specific ASPX page which works out the URL requested and displays the requested content.

The problem we are having only occurs on pages requested this way. Our RadScheduler/RadAjaxManager are in an ASCX custom control and if I add that control directly to an ASPX file and request it directly the problem does not happen.

This is the code from our ASCX control:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WsiEventCalendar.ascx.cs" Inherits="STAFF.PageTemplates.WsiEventCalendar" %>
<%@ Register TagPrefix="scheduler" TagName="AdvancedForm" Src="AdvancedForm.ascx" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<asp:Panel ID="pnlError" runat="server" Visible="false">
    Event not found.
</asp:Panel>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
         <asp:ScriptReference Path="AdvancedForm.js" />
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
          
        <script type="text/javascript"
        //<![CDATA[
  
            // Dictionary containing the advanced template client object
            // for a given RadScheduler instance (the control ID is used as key).
            var schedulerTemplates = {};
  
            function schedulerFormCreated(scheduler, eventArgs) {
                // Create a client-side object only for the advanced templates
                var mode = eventArgs.get_mode();
                if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                    mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
                    // Initialize the client-side object for the advanced form
                    var formElement = eventArgs.get_formElement();
                    var templateKey = scheduler.get_id() + "_" + mode;
                    var advancedTemplate = schedulerTemplates[templateKey];
                    if (!advancedTemplate) {
                        // Initialize the template for this RadScheduler instance
                        // and cache it in the schedulerTemplates dictionary
                        var schedulerElement = scheduler.get_element();
                        var isModal = scheduler.get_advancedFormSettings().modal;
                        advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
                        advancedTemplate.initialize();
  
                        schedulerTemplates[templateKey] = advancedTemplate;
  
                        // Remove the template object from the dictionary on dispose.
                        scheduler.add_disposing(function () {
                            schedulerTemplates[templateKey] = null;
                        });
                    }
  
                    // Are we using Web Service data binding?
                    if (!scheduler.get_webServiceSettings().get_isEmpty()) {
                        // Populate the form with the appointment data
                        var apt = eventArgs.get_appointment();
                        var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
                        advancedTemplate.populate(apt, isInsert);
                    }
                }
            }
              
        //]]>
        </script>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function Export(sender, e) {
                $find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");
            }
        </script>
    </telerik:RadCodeBlock>
    <style type="text/css">
        .RadScheduler .rsExportButton
        {
            position: absolute;
            bottom: 0;
            right: 0;
            border: 0;
            height: 24px;
            width: 24px;
            background: url('/images/icons/Outlook.gif') no-repeat center center;
        }
        .RadScheduler .rsAllDayRow .rsExportButton
        {
            right: 20px;
            height: 16px;
            width: 16px;
            background: url('/images/icons/SmallOutlook.gif');
        }
    </style>
<asp:Panel ID="pnlForm" runat="server">
    <telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="WeekView"
                TimeZoneOffset="00:00:00" DayStartTime="08:00:00" DayEndTime="18:00:00" OnAppointmentCreated="RadScheduler1_AppointmentCreated" 
                ProviderName="SchedulerData" EnableDescriptionField="True" AppointmentStyleMode="Default" OnAppointmentCommand="RadScheduler1_AppointmentCommand" 
            OnClientFormCreated="schedulerFormCreated" CustomAttributeNames="AppointmentColor,EventLocation">
            <AdvancedForm Modal="true" />
            <Reminders Enabled="false" />
            <AppointmentTemplate>
                <div class="rsAptSubject">
                    <%# Eval("Subject") %>
                </div>
                <%# Eval("Description") %>
                <div style="text-align: right;">
                    <asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Export to iCalendar"
                    CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer;
                    cursor: hand;" />
                </div>
            </AppointmentTemplate>
            <AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
                    Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' EventLocation='<%# Bind("EventLocation") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>' AudienceID='<%# Bind("Audience") %>'
                    CategoryID='<%# Bind("Category") %>' />
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' EventLocation='<%# Bind("EventLocation") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>' AudienceID='<%# Bind("Audience") %>'
                    CategoryID='<%# Bind("Category") %>' />
            </AdvancedInsertTemplate>
            <TimelineView UserSelectable="false" />
            <TimeSlotContextMenuSettings EnableDefault="true" />
            <AppointmentContextMenuSettings EnableDefault="true" />
    </telerik:RadScheduler>
</asp:Panel>

And the code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Text;
using SharedDataAccess;
  
namespace STAFF.PageTemplates
{
    public partial class WsiEventCalendar : System.Web.UI.UserControl
    {
  
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
        protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
        {
            e.Appointment.ToolTip = e.Appointment.Subject + ": " + e.Appointment.Description;
  
            //showing the recurring icons
            if (e.Appointment.RecurrenceState == RecurrenceState.Master || e.Appointment.RecurrenceState == RecurrenceState.Occurrence)
            {
                Panel recurrenceStateDiv = new Panel();
                recurrenceStateDiv.CssClass = "rsAptRecurrence";
                e.Container.Controls.AddAt(0, recurrenceStateDiv);
            }
  
            if (e.Appointment.RecurrenceState == RecurrenceState.Exception)
            {
                Panel recurrenceStateDiv = new Panel();
                recurrenceStateDiv.CssClass = "rsAptRecurrenceException";
                e.Container.Controls.AddAt(0, recurrenceStateDiv);
            }
  
        }
  
        protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
        {
            if (e.CommandName == "Export")
            {
                WriteCalendar(RadScheduler.ExportToICalendar(e.Container.Appointment));
            }
        }
  
       
        private void WriteCalendar(string data)
        {
            HttpResponse response = Page.Response;
  
            response.Clear();
            response.Buffer = true;
  
            response.ContentType = "text/calendar";
            response.ContentEncoding = Encoding.UTF8;
            response.Charset = "utf-8";
  
            response.AddHeader("Content-Disposition", "attachment;filename=\"WsiEventExport.ics\"");
  
            response.Write(data);
            response.End();
        }
  
    }
}

Any idea why this problem is happening only in these circumstances?
John
Top achievements
Rank 1
 answered on 27 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?