Hi all,
We have a Radgrid in a web page on Server A that is used inside a web app in an iframe on server B. Basically this means it’s in a different domain and access to parent objects is not allowed.
When the mouse moves over the grid a javascript error “Access is denied” appears because of “top.document”. Full details are:
ScriptResource.axd - line 5959
var offsetL = w.screenLeft - top.screenLeft - top.document.documentElement.scrollLeft + 2;
Is there some way that we can configure the control to not have this issue? Can we have exception handling placed into the javascript?
ASPX Layout is defined below
<telerik:RadGrid ID="rgLog" runat="server" AutoGenerateColumns="False" GridLines="None" OnItemDataBound="rgLog_ItemDataBound" OnNeedDataSource="rgLog_NeedDataSource" Width="100%" OnDetailTableDataBind="rgLog_DetailTableDataBind" Skin="Outlook" ShowHeader="False">
<MasterTableView>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
</MasterTableView>
</telerik:RadGrid>
Thanks in advance!
<
script type="text/javascript">
var
Grid
function
RowSelected(rowIndex)
{
alert(
"Click on row with index: " + rowIndex);
var path = Grid.getCellByColumnUniqueName(Grid.Rows[rowIndex], "DT_FilePath").innerHTML;
var Filename = Grid.getCellByColumnUniqueName(Grid.Rows[rowIndex], "DT_FileName").innerHTML;
alert(
"Path=" + path);
alert(
"Filename=" + Filename);
}
function
GridCreated() {
alert(
"Grid with ClientID: " + this.ClientID + " was created");
Grid =
this;
}
</
script>
<
rad:RadGrid ID="DocGrid" runat="server" AutoGenerateColumns="False" DataSourceID="SDS1" GridLines="None" Skin="Green" EnableAJAX="True">
<ClientSettings ApplyStylesOnClient="True">
<Selecting AllowRowSelect="True"></Selecting>
<ClientEvents OnRowClick="RowSelected" OnGridCreated="GridCreated">
</ClientEvents>
</ClientSettings>
<
MasterTableView DataSourceID="SDS1" GridLines="Both">
<
RowIndicatorColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
RowIndicatorColumn>
<
ExpandCollapseColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
ExpandCollapseColumn>
<Columns>
<rad:GridBoundColumn DataField="DT_FileNum" HeaderText="DT_FileNum" SortExpression="DT_FileNum" UniqueName="DT_FileNum" Display="False">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_Desc" HeaderText="Document" SortExpression="DT_Desc" UniqueName="DT_Desc">
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_DateTime" DataType="System.DateTime" HeaderText="Create Date" SortExpression="DT_DateTime" UniqueName="DT_DateTime"
DataFormatString="{0:MM/dd/yyyy}">
<HeaderStyle Width="70px" />
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_Clerk" HeaderText="Clerk" SortExpression="DT_Clerk" UniqueName="DT_Clerk">
<HeaderStyle Width="80px" />
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_FilePath" Display="False" HeaderText="DT_FilePath" SortExpression="DT_FilePath" UniqueName="DT_FilePath">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_FileName" Display="False" HeaderText="DT_FileName" SortExpression="DT_FileName" UniqueName="DT_FileName">
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DT_DocumentCategory" HeaderText="Category" SortExpression="DT_DocumentCategory" UniqueName="DT_DocumentCategory">
<ItemStyle Font-Size="Small" />
</rad:GridBoundColumn>
</Columns>
</
MasterTableView>
</
rad:RadGrid>
<
asp:SqlDataSource ID="SDS1" runat="server" ConnectionString="<%$ ConnectionStrings:CASConnection %>"
SelectCommand="SELECT [DT_FileNum], [DT_Desc], [DT_DateTime], [DT_Clerk], [DT_FilePath], [DT_FileName], [DT_DocumentCategory] FROM [DocumentTable] WHERE ([DT_FileNum] = @DT_FileNum) ORDER BY [DT_DateTime] DESC, [DT_Desc]">
<SelectParameters>
<asp:SessionParameter DefaultValue="1999001544" Name="DT_FileNum" SessionField="FileNum" Type="String" />
</SelectParameters>
</
asp:SqlDataSource>
In the RowSelected function I get the first alert but not the last two. What am I doing wrong.
Thanks.
I have a datetime column in which i have dbnull values in several rows. When I try and filter the column, I get the following:
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
It appears that the filter doesn't handle nulls.
Any ideas?
Thanks,
Terry Webster
I have a problem with onclick property when I run my project. After run the project I try to click combobox and then I get an error like this:
Microsoft JScript runtime error: Object expected
I get an error on this row:
<fieldset style="width: 170px;" id="Fieldset3" onclick="return FIELDSET3_onclick()">
I get the same error on onclick property of radwindowmanager
<telerik:RadWindowManager
id="Odeyen_window"
runat="server" Skin ="Web20"
OnClientPageLoad="CenterAc()" > //I got error on this row
<windows>
<telerik:RadWindow id="PrintWnd"
Modal = "True"
Runat="server"
Skin ="Web20"
NavigateUrl="" Title="">
</telerik:RadWindow>
</windows>
</telerik:RadWindowManager>
And here is my CenterAc function
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function
CenterAc()
{
GetRadWindow().Center();
}
please help me to solve this problem
thanks

| <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderMain" Runat="Server"> |
| <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> |
| </telerik:RadAjaxManagerProxy> |
| <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /> |
| </asp:Content> |
| <asp:Content ID="content5" ContentPlaceHolderID="ContentPlaceHolderRight" runat="server"> |
| <asp:TextBox ID="TextBox1" runat="server" Text="0"></asp:TextBox> |
| </asp:Content> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| this.RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting(Button1, TextBox1, null); |
| } |
| protected void Button1_Click(object sender, EventArgs e) |
| { |
| this.TextBox1.Text = (int.Parse(this.TextBox1.Text) + 1).ToString(); |
| } |
| <rad:RadMenu id="reACTMenu" runat="server" Skin="Web20" Width="922px" EnableEmbeddedSkins="false"></rad:RadMenu> |
When I open a modal dialog box in a page using this master page, the menu bar appears above the window.
Here is the window definition:
| <rad:RadWindowManager id="WindowMgr" |
| runat="server" |
| Skin="Vista" |
| VisibleStatusbar="false" |
| OnClientClose="OnWindowClose"> |
| <windows> |
| <rad:RadWindow id="RelateWindow" |
| Modal="true" |
| Runat="server" |
| Width="400px" |
| Behavior="Move,Close" |
| Height="400px" |
| NavigateUrl="AppendTicketSearch.aspx" |
| OnClientShow="centerWindow" |
| OnClientClose="afterRelate"> |
| </rad:RadWindow> |