Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
362 views
Not sure what I'm doing wrong.  I have an operation (initiated from a GridButtonItem click) that occurs inside an async postback.  Depending on the results of the operation I need to update image and label controls hosted in a RadWindow, display the RadWindow, wait for the user to click a button, determine the button that was clicked and continue with the operation.

For the life of me I can't get the RadWindow to open with generating an exception.  I've stripped out the RadGrid and simplified the code to try to find the problem but alas, no joy.

My aspx looks like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZZRadWindow.aspx.cs" Inherits="SitefinityWebApp.ZZRadWindow" %>
 
<!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>
    <script>
 
        function OpenWindow()
        {
            var wndMgr = GetRadWindowManager();
            wndMgr.open("", "ConfirmPlaybackWindow");
            return false;
        }
         
    </script>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" ID="ScriptMgr" />
        <asp:UpdatePanel ID="WindowUpdatePnl" runat="server">
            <ContentTemplate>
            <asp:Label ID="msgLbl" runat="server" />
                <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" Skin="Forest" EnableShadow="true" Font-Bold="False" Modal="True">
                    <Windows>
                        <telerik:RadWindow ID="ConfirmPlaybackWindow" runat="server" DestroyOnClose="False" Skin="Forest" Modal="True">
                            <ContentTemplate>
                                <div class="confirmationDlgWrp">
                                    <div class="alertWrp">
                                        <asp:Image ID="AlertImg" runat="server" CssClass="dlgIcon" />
                                        <asp:Label ID="AlertLbl" runat="server" CssClass="dlgLabel" Text="Hello World" />
                                    </div>
                                    <div class="confirmationDlgBtnWrp">
                                        <asp:Button ID="YesBtn" runat="server" CssClass="dlgYesBtn" Text="Yes" />
                                        <asp:Button ID="NoBtn" runat="server" CssClass="dlgNoBtn" Text="No" />
                                    </div>
                                </div>
                            </ContentTemplate>
                        </telerik:RadWindow>
                    </Windows>
                </telerik:RadWindowManager>
                <asp:Button ID="PostBackButton" runat="server" Text="Do Postback" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <p />
        <asp:Button ID="Button1" runat="server" OnClientClick="return OpenWindow()" Text="Open RadWindow" />
    </div>
    </form>
</body>
</html>

And my codebehind looks like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace SitefinityWebApp
{
    public partial class ZZRadWindow : System.Web.UI.Page
    {
        private static int PostBackCount = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                msgLbl.Text = string.Format("{0}<p/>PostBackCount: {1}", msgLbl.Text, ++PostBackCount);
                string script2 = "<script type=\"text/javascript\">OpenWindow();</script>";
                ScriptManager.RegisterStartupScript(WindowUpdatePnl, typeof(string), "OpenWindow", script2, false);
            }
        }
    }
}


Clicking the button located outside the UpdatePanel result in the RadWindow displaying without error.  Clicking the postback button located inside the UpdatePanel results in the following exception:

Microsoft JScript runtime error: Sys.InvalidOperationException: Can't be called after dispose

Any idea what I'm doing wrong here?

Thanks -- Steve 
Marin Bratanov
Telerik team
 answered on 19 Dec 2011
8 answers
219 views
Alright...every time I drag an "old" telerik control that uses version 2009.3.1314.20 of the .dll, it overwrites the newer version of 2009.3.1314.35. As a result, it gives me the following error:

"Could not load file or assembly "Telerik.Web.UI, Version=2009.3.1314.35...or one of its dependencies.  The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

 I have tried for two days to figure out how to fix this, or to stop this incessant overwriting, but I have been unable to do so.  Worse still, I am now at least 2 days behind on my project, and my supervisors are wondering if we shouldn't just go back to the 'old' tools we had instead of using Telerik, because this looks like (at least, it does to them) that Telerik has some serious stability issues to address.  I can't say I disagree....

The second problem is an error that says:

"Cannot create an object of type 'System.String[]' from its string representation 'KeyField' for the 'DataKeyNames' property."

This error is especially infuriating because I have the EXACT SAME CODE on another page....and it WORKS!  I have no idea what the problem is, or how to fix this.  Attached is a screenshot (cropped) of the errors in question.  I really need some help here before I throw my monitor out the nearest window!
Lini
Telerik team
 answered on 19 Dec 2011
4 answers
125 views

I am using the RadProgressArea;  the cancel button displays but does not work on Safari. Also the TotalProgressPercent indicator does not dispay.

I have the newest version of Rad. I am using Safari 3.0.3 on a Vista Box.

<telerik:RadProgressManager ID="RadProgressManager1" runat="server" /> 
<telerik:RadProgressArea ID="RadProgressArea2" runat="server" DisplayCancelButton="True" ProgressIndicators="TotalProgressBar, TotalProgressPercent, TimeElapsed, TimeEstimated" Skin="Black">  
    <Localization Uploaded="Uploaded" /> 
</telerik:RadProgressArea> 
 
Dimitar Terziev
Telerik team
 answered on 19 Dec 2011
1 answer
486 views
I just tried creating a skin with the Style Builder and it is not including the SPELL.xxx.css file needed. Can we get the Spelling component added?   

The DIALOG css contains an import for the Spell.xxx.css
Bozhidar
Telerik team
 answered on 19 Dec 2011
1 answer
247 views
There is a known problem with maxJsonLength property:

http://support.microsoft.com/kb/981884

However, this hotfix did not work. Maybe because it is for the MS UpdatePanel?

If so, how can this be resolved? This error comes up when grid tries to pull too many rows.

-Stan

Veli
Telerik team
 answered on 19 Dec 2011
1 answer
158 views
I am having problem to display the contents within the form template. I have the following in my rad grid :-

<EditFormSettings EditFormType="Template">
                <FormTemplate>
                    <table id="1" width="100%" border="0" cellpadding="0" cellspacing="10">
                        <tr>
                            <td colspan="3">
                                <span class="des"><asp:Label ID="lblDestination" runat="server" Text='<%# Eval("Destination") %>' /></span>
                            </td>
                        </tr>
..

and I would like to hide the table row based on the DataTable binding. May I know is there any good way of doing this?
Shinu
Top achievements
Rank 2
 answered on 19 Dec 2011
1 answer
123 views
I have a column that displays the date and time the recorded was entered.  I would like to be able to put the date and time in the same column with the date on top and the time underneath.  I would also like to have the end usser sort when they click the header, is this posible?
Thanks.
Princy
Top achievements
Rank 2
 answered on 19 Dec 2011
3 answers
71 views
I have a grid with edit and delete buttons.When I export grid to pdf,edit and delete columns are exported too.Is there a way to remove edit and delete columns when exporting the grid to pdf?
Shinu
Top achievements
Rank 2
 answered on 19 Dec 2011
1 answer
219 views

Dear all,

I’m trying to open the Rad window as modal and to be able to calculate the size of the opened window based on the opened page size i.e 400x400 and keep it centered. I don’t not want to use the autosize property.

Below is my Rad window setting as well the JS code which I use to recalculate the window size to fill the window.

Yourhelp is appreciated to open the modal window centered and in correct size based on the content page.
var oWnd = window.radopen(_EncryptedURL, "AdvancedForm");
oWnd.set_title(pageTitle);
resizeRadWindow(oWnd);
 
function resizeRadWindow(radWindow) {
 
    var windowHeight = $(window).height();
    var windowWidth = $(window).width();
 
    windowHeight = (windowHeight * 97.5) / 100;
    windowWidth = (windowWidth * 98) / 100;
 
    radWindow.moveTo(10, 10);
    radWindow.setSize(windowWidth, windowHeight);
}
<
rad:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <rad:RadWindow ID="AdvancedForm" runat="server" Modal="True" OpenerElementID="showDialog"
                InitialBehaviors="None" ShowContentDuringLoad="false" Behaviors="Close" OnClientClose="refreshScheduler"
                ReloadOnShow="True" Title="" NavigateUrl="" VisibleStatusbar="False">
            </rad:RadWindow>
        </Windows>
    </rad:RadWindowManager>
Princy
Top achievements
Rank 2
 answered on 19 Dec 2011
1 answer
123 views
Hi,

I want to give the users the option of deleting items on a treelist grid, but I only want them to delete a full node. Or, to put it on a single question, is it possible to show a delete button only when Parent ID is null?
Princy
Top achievements
Rank 2
 answered on 19 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?