Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
341 views
We have a customer with the website www.customer.com. When a visitor enters the site a RadWindow is opened with a survey. This survey comes from the domain survey.customer.com (both located on the same physical server).

This works just fine, but when trying to close the RadWindow with anything other than the "x" in the top right a javascript error occurs, saying Access Denied.

This is from the FireFox error console:
Error: Permission denied for <http://survey.customer.com> to get property HTMLIFrameElement.radWindow from <http://www.customer.com>. 
Source File: http://survey.customer.com/content/pages/smallstartpage.aspx?code=123 
Line: 36 

I'm calling a javascript-function CloseRadWindow on survey.customer.com to close the RadWindow.

Here is the javascript used:
<script type="text/javascript" language="javascript"> 
        function GetRadWindow() { 
            var oWindow = null; 
            if (window.radWindow) oWindow = window.radWindow; 
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
            return oWindow; 
        } 
 
        function CloseRadWindow() { 
            var oWindow = GetRadWindow(); 
            if (oWindow != null) 
                oWindow.Close(); 
            else 
                close(); 
        } 
    </script> 

Is there any solution to this? I have used a similar approach for another customer, but at that time both pages where on the same domain/subdomain - I suspect the issue might be different subdomains here?

If there are any other easy ways to close the RadWindow from within the RadWindow itself I'm happy to hear about it.

FYI: No error is displayed when testing on the dev-computer running both projects on localhost.

Br,
Hans






wnl
Top achievements
Rank 1
 answered on 10 Nov 2011
5 answers
330 views
Hi All,

I have a context menu targeting a RadGrid.  I've successfully figured-out some pretty complex stuff with the menu and the grid, but I am stuck on what seems like a very simple issue.  To make this easy to discuss, I've simplified my problem.

The bottom line is that I am having a difficulty capturing the "clicked item" in JS.  The procedure I am using is almost exactly as described in here:  http://www.telerik.com/help/aspnet-ajax/menu-onclientitemclicked.html

In short, my context menu is targeting my grid, no problem.  Also, my on click event is firing as well.  Here is a simplified version:

function OnContextMenu_Grid(sender, args) {
    var myMenuItem = args.get_item().get_value();
    alert(myMenuItem)
 
}

Here is my context menu config:

<telerik:RadContextMenu ID="FlowsContextMenu" Runat="server"
        onclientitemclicked="OnContextMenu_Grid">
        <Targets>
            <telerik:ContextMenuControlTarget ControlID="RadGrid1" />
        </Targets>
        <Items>
            <telerik:RadMenuItem runat="server" Text="EDIT This Item">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" IsSeparator="True" Text="Line">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="Add One">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Normal Flow">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Alternate Flow">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Business Rule">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadContextMenu>


However, when the event fires "myMenuItem" is null.  The alert window pops up, but still a null value.  I figure this is probably something simple, but I cannot spot it.  I would really appreciate some help.

The code for my entire page is attached below.  Thank you so much for any help!

Jim



<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="ContextTest.aspx.vb" Inherits=".ContextTest" %>
 
<!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>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--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>
    <script type="text/javascript">
 
        function OnContextMenu_Grid(sender, args) {
            var myMenuItem = args.get_item().get_value();
            alert(myMenuItem)
 
        }
 
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <telerik:RadContextMenu ID="FlowsContextMenu" Runat="server"
        onclientitemclicked="OnContextMenu_Grid">
        <Targets>
            <telerik:ContextMenuControlTarget ControlID="RadGrid1" />
        </Targets>
        <Items>
            <telerik:RadMenuItem runat="server" Text="EDIT This Item">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" IsSeparator="True" Text="Line">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" Text="Add One">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Normal Flow">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Alternate Flow">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Business Rule">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadContextMenu>
    <br />
    <div>
 
        <br />
        <br />
        <br />
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None">
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <ClientEvents />
            </ClientSettings>
            <MasterTableView DataSourceID="SqlDataSource1" ClientDataKeyNames="UseCaseID">
                <CommandItemSettings ExportToPdfText="Export to PDF" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="UseCaseID" DataType="System.Int32"
                        FilterControlAltText="Filter UseCaseID column" HeaderText="UseCaseID"
                        SortExpression="UseCaseID" UniqueName="UseCaseID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CaseName"
                        FilterControlAltText="Filter CaseName column" HeaderText="CaseName"
                        SortExpression="CaseName" UniqueName="CaseName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CrossCase"
                        FilterControlAltText="Filter CrossCase column" SortExpression="CrossCase"
                        UniqueName="CrossCase" HeaderText="CrossCase">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Tallys"
                        FilterControlAltText="Filter Tallys column" SortExpression="Tallys"
                        UniqueName="Tallys" HeaderText="Tallys">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <EditItemStyle BorderStyle="None" />
            <HeaderStyle BorderStyle="None" />
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:DatabaseUseCase1 %>"
            SelectCommand="SELECT UseCaseID, CaseName, CrossCase, Tallys FROM v_CaseTree WHERE (CaseParentID = 45) AND (AlternateFlowYN = 2) ORDER BY CaseSort">
        </asp:SqlDataSource>
        <br />
 
    </div>
    </form>
</body>
</html>





Raj
Top achievements
Rank 1
 answered on 10 Nov 2011
1 answer
146 views
Hi,
I have tried changing the font size of rad doc.
I changed font-size from Medium to Large, but it changing only in the design mode, where as it's not chnaging in the
run time.Runtime the font is fixed, irrespective of what font-size I have given.
Please help.
Thanks,
Sijo.
Princy
Top achievements
Rank 2
 answered on 10 Nov 2011
2 answers
160 views
Hi,

We have an application using several RadGrids for different user data listings. In all of them we have the user registration date as a GridDateTimeColumn. When setting AllowFiltering="true" for that column the width of the Grid becomes totally screwed up on the Ipad or any other IOS device. The Grid becomes so wide it's not even possible to scroll sideways that far... When setting the value to false the Grid stays within the page boundaries and is about 700 or 800 px wide. All other columns work fine with filtering.

Has anybody come across this problem?

Thanks!

/Christofer
Christofer Hagstedt
Top achievements
Rank 1
 answered on 10 Nov 2011
4 answers
179 views

Hello,
after installing the Hot Fix for Microsoft Knowledge Base article number(s) 2553048 for Sharepoint 2010 SP1 i receive this error on default page.

Webpage error details

Message: ASP.NET Ajax client-side framework failed to load.
Line: 196
Char: 34
Code: 0
URI: http://srv-sp2010:30000/Pagine/default.aspx

Message: 'Sys' is undefined
Line: 223
Char: 1
Code: 0
URI: http://srv-sp2010:30000/Pagine/default.aspx

Message: 'Sys' is undefined
Line: 1371
Char: 1
Code: 0
URI: http://srv-sp2010:30000/Pagine/default.aspx

Message: 'Type' is undefined
Line: 2
Char: 1
Code: 0
URI: http://srv-sp2010:30000/_layouts/sp.core.debug.js?rev=Qp5K7ycU%2FEY9IvE0KOi7zQ%3D%3D

Message: Object doesn't support this property or method
Line: 5
Char: 3
Code: 0
URI: http://srv-sp2010:30000/_layouts/cui.debug.js?rev=%2BhQl2NTQMTydPivdG%2Bq%2FdA%3D%3D

I use in my master page:
<telerik:RadScriptManager ID="ScriptManager"  runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"/>
 if i change with scriptmanager i don't have error.
<asp:ScriptManager ID="ScriptManager"  runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"/>

I use Telerik version 2010.1.309.35

Thanks.

Kalina
Telerik team
 answered on 10 Nov 2011
1 answer
270 views
I have a RadBinaryImage in a asp:Repeater template. I also have a RadBinaryImage in a RadRotator template. The Repeater works. The Rotator does not. What am I doing wrong?
<asp:Repeater runat="server" ID="AttachmentRepeater" EnableViewState="false">
    <ItemTemplate>
        <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" ResizeMode="Fit" DataValue='<%# Eval("Image")%>' Width="200" Height="200" />
    </ItemTemplate>
</asp:Repeater>
 
        <telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="ButtonsOver" Width="572"
            Height="118px" ItemHeight="118" ItemWidth="145" FrameDuration="1000" ScrollDirection="Left,Right" OnItemClick="ShowImage">
            <ItemTemplate>
                <div>
                    <telerik:RadBinaryImage ID="RadBinaryImage2" runat="server" ResizeMode="Fit"
                                             DataValue='<%# Eval("Image")%>' Width="200" Height="200" />
                </div>
            </ItemTemplate>
            <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
        </telerik:RadRotator>

In the following code, the Images collection contains objects that have a Byte[] property and a String property. The Byte[] is the contents of an image acquired by using an AsyncUpload control.

DataTable rotatorData = new DataTable();
 rotatorData.Columns.Add("Image", typeof(System.Array));
 rotatorData.Columns.Add("Name");
 foreach (ImageInfo tempInfo in Images)
 {
     DataRow row = rotatorData.NewRow();
     row["Image"] = tempInfo.Image;
     row["Name"] = tempInfo.Name;
     rotatorData.Rows.Add(row);
 }
 thumbRotator.DataSource = rotatorData;
 thumbRotator.DataBind();

Shinu
Top achievements
Rank 2
 answered on 10 Nov 2011
1 answer
84 views
I am using a RadComboBox control in a SharePoint 2010 visual web part with Load-On-Demand enabled (server-side ItemsRequested event), but I am getting a client error "There was an error in the callback" when I set focus to the combobox or if I type a letter in the textbox. With debugging enabled I can see the user control's Page_Load event being fired, but the ItemsRequested event is never fired. Any ideas as to why this is happening?

Thanks,
Larkin
Kalina
Telerik team
 answered on 10 Nov 2011
1 answer
374 views
Hi:
I am creating a chart, where the chart could be a line or bar.  The # of point could be 3 or 120.  So the following issue and example are interestingly similar, I am looking to remove the white-space above and below the plot-area.
http://www.telerik.com/community/forums/aspnet-ajax/chart/white-space-above-and-below-chart-when-dynamically-setting-height.aspx
But, I have a RadGrid below my chart.  The fun part is that the 2 controls seem to partially overlay each other (not good in a production system).
<%@ Page Title="" Language="VB" MasterPageFile="~/Member.Master" AutoEventWireup="false" CodeFile="RadChartTitle.aspx.vb" Inherits="Learning_RadChartTitle" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <telerik:RadChart ID="radChart" runat="server" AutoLayout="true" Width="750" Height="450">
    </telerik:RadChart>
    <telerik:RadGrid ID="chartDataRadGrid" runat="server"
        Width="100%" ShowHeader="false" >
        <MasterTableView AutoGenerateColumns="False" ShowHeader="true">
            <Columns>
                <Telerik:GridBoundColumn DataField="Name" UniqueName="Index" HeaderText="Index" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" Visible="true" />
                <Telerik:GridBoundColumn DataField="Value" UniqueName="V1Column" HeaderText="Value 1" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" Visible="true" />
                <Telerik:GridBoundColumn DataField="Value2" UniqueName="V2Column" HeaderText="Value 2" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" Visible="true" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</asp:Content>
Code behind:
Option Explicit On
Option Strict On
'
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports Telerik.Charting
Partial Class Learning_RadChartTitle
    Inherits System.Web.UI.Page
    '
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        Dim _table As DataTable = GetTable()
        '
        Dim _series1 As New ChartSeries()
        Dim _numOfSeries As Integer = 2
        _series1.Type = ChartSeriesType.Bar
        _series1.DataYColumn = "Value"
        _series1.Name = "Series 1"
        radChart.Series.Add(_series1)
        '
        If _numOfSeries = 2 Then
            Dim _series2 As New ChartSeries()
            _series2.Type = ChartSeriesType.Bar
            _series2.DataYColumn = "Value2"
            _series2.Name = "Series 2"
            radChart.Series.Add(_series2)
        End If
        radChart.PlotArea.XAxis.DataLabelsColumn = "Name"
        radChart.SeriesOrientation = ChartSeriesOrientation.Horizontal
        radChart.DataSource = _table
        radChart.Appearance.Dimensions.Height = Telerik.Charting.Styles.Unit.Pixel(_table.Rows.Count * 25 * _numOfSeries)
        radChart.DataBind()
        chartDataRadGrid.DataSource = _table
        chartDataRadGrid.DataBind()
    End Sub
    '
    Private Shared Function GetTable() As DataTable
        Dim table As New DataTable()
        'table columns
        table.Columns.Add("Name", GetType(String))
        table.Columns.Add("Value", GetType(Integer))
        table.Columns.Add("Value2", GetType(Integer))
 
        'table rows
        table.Rows.Add("Value1", 10, 20)
        table.Rows.Add("Value2", 20, 30)
        table.Rows.Add("Value3", 30, 21)
        table.Rows.Add("Value4", 40, 35)
        table.Rows.Add("Value5", 50, 50)
        table.Rows.Add("Value6", 60, 62)
        table.Rows.Add("Value7", 70, 65)
        table.Rows.Add("Value8", 80, 68)
        table.Rows.Add("Value9", 90, 71)
        table.Rows.Add("Value10", 100, 74)
        table.Rows.Add("Value11", 110, 77)
        Return table
        '
    End Function
End Class
Thanks for your help
Phil
p.s. comment all but one row of data ...
Peshito
Telerik team
 answered on 10 Nov 2011
3 answers
247 views
I initially downloaded the trial version and installed it.  I then downloaded my licensed version.  The extensions don't appear to be correctly installed in VS 2010.  Although I have the telerik menu,  I don't have anything under it except "About".  Further the templates are not present and the context menu of the solution explorer is not present. 

I have uninstalled and installed 3 times with no change.

Is there a manual way to install?

Thanks,
Peter
Top achievements
Rank 1
 answered on 10 Nov 2011
3 answers
118 views
Hi,
       I am using a rad chart (type="Line") where I need to set major grid line style for each axis item in the y axis like, need to set different color for different grid lines and set visibility =false for some items etc. Is there a chance to do this ? I know there is a property to set the visibility or other styles for all the axis items in the y axis. But my need is to do the styling for individual items separately.
Thanks & Regards
Shafi
Evgenia
Telerik team
 answered on 10 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?