Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
424 views
Hi There

I have a master page and content page.  I would like to call a function in code behind of the 'parent' page when the radwindow is closed.  My problem is that when I load the parent page the first time, the postback occurs when I specify OnClientClose="__doPostBack()" - even before I have opened the RadWindow and closed it.  What am I doing wrong?  I want it to only fire once the user has opened the RadWindow and closes it.

Here's my code:

<%

@ Page Language="VB" MasterPageFile="~/MasterHRJ001.master" AutoEventWireup="false" CodeFile="tester.aspx.vb" Inherits="tester" title="Untitled Page" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 

 

<asp:linkbutton id="Test" runat="server" text="Create Text file" onclick="Test_Click" />

 

 

 

 

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Black"

 

 

DestroyOnClose="true"

 

 

OnClientClose="__doPostBack('ctl00$ContentPlaceHolder1$Test','')"

 

 

>

 

 

<Windows>

 

 

<telerik:RadWindow

 

 

id="RadWindow1"

 

 

runat="server"

 

 

showcontentduringload="False"

 

 

width="900px"

 

 

height="550px"

 

 

 

 

title="Telerik RadWindow" Modal="true" VisibleStatusbar="false" Skin="Black" style="display:none;" InitialBehavior="None" Left="" NavigateUrl="" Top="">

 

 

</telerik:RadWindow>

 

 

 

 

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 

 

 

<script type="text/javascript">

 

 

//<![CDATA[

 

 

 

function openRadWin5()

 

{

radopen(

"business-sol-surveys.aspx?cont=5","RadWindow1");

 

}

 

 

//]]>

 

 

</script>

 

 

 

<a id="A1" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$Test','')">Testing to see if the postback works</a>

 

 

<

 

a id="A2" href="javascript: openRadWin5()">Open RAD Win 5</a>

 

 

</

 

asp:Content>

 

Pat Huesers
Top achievements
Rank 1
 answered on 23 Jan 2012
1 answer
62 views
Dear Telerik Support Team

Since i updated to version 2011.3.1305.35 i'm having a problem with RadDatePicker. It says: "Telerik.RadDatePickerPopupDirection.BottomRight is null or not an object". I saw that this is a common problem among users of older versions of telerik (2009), but not with this one.
Alexandre
Top achievements
Rank 1
 answered on 23 Jan 2012
1 answer
134 views
Hello,

I am working with a RadChart as a stacked bar style and showing the DataTable below the chart which shows value percentages. However, I am using some values with large range differences and this means several of my data items are less than 1% but show as 0% in the DataTable. Is it possible to change the DataTable values to show percentages less than 1%?

Thanks
Richard
Top achievements
Rank 1
 answered on 23 Jan 2012
2 answers
118 views
I have a RadWindow that pops up a search using a RadGrid.  Sometimes the parent window will lose its state or session after clicking a series of controls.  It is a very odd problem but seems to occur everywhere I use a RadWindow in this fashion.  If I open the RadWindow, click search twice and then page 6 times then the parent window loses state or session (not sure exactly).  It's very strange, because why does it take paging the RadGrid 6 times to cause the problem and not 3 or 4?  So, at this point, I am looking for any ideas or even guesses as to what may be causing this problem.  I don't want to post the code because there is too much to reasonably ask you to look at, but please let me know if you have any thoughts that might be useful.
Tony Upchurch
Top achievements
Rank 1
 answered on 23 Jan 2012
6 answers
451 views
Way back when I used the AJAX Control Toolkit's "Modal Popup Extender" control to create some interactive dialog boxes in my ASP.net application.  I'm attaching a screenshot sample of one of them.

Now that I've purchased your full set of controls, I'm investigating whether I can use RadWindow to replace the Modal Popup Extender.

I thought I was getting somewhere but then hit some roadblocks.  The crux of the problem is that with RadWindow, it seems impossible to do both of the following from the click of an ASP.net button:
  1. Run server-side code to initialize the contents of the dialog box.
  2. Open the dialog box.
My testing results seem to be confirmed by this: http://mono.telerik.com/Window/Examples/OpenAndPosition/DefaultCS.aspx

However, I thought that I should check with you to see if anything has changed in this regard or is about to, for it sure would be great if this functionality were possible!

Sincerely,

Robert W.
Vancouver
Marin Bratanov
Telerik team
 answered on 23 Jan 2012
1 answer
83 views
This is what happen. I have an image for a column and on itemdatabound, i will set each of the item with attribute onclick to call a js function(which will make the tooltip appear). This is all good, but the problem is, lets say the image i clicked earlier(in order to make the tooltip appear) is on the 1st row. Then i click on the tooltip x button to close it. Then i hover on the 1st row again, the tooltip appears? But i didn't set the onmouseover attribute. Why is the tooltip appears when hover?

Then if i click on the 2nd row, and i try to hover on the 1st row, the tooltip will not appear. But the problem will happen to the 2nd row. Which to sum it up, the tooltip appeared for the active row. So anyway to turn this off?

Regards,
Dexter

Marin Bratanov
Telerik team
 answered on 23 Jan 2012
5 answers
289 views
We are using RadSpell on touch screens and we cannot restyle or override the confirm dialog (pops up after you hit cancel after changing a word) for bigger buttons so I just want to get rid of it.

OnClientCheckCancelled only fires after a selection is made in the confirm dialog and I cannot suppress it this way

Using 
window.confirm = function(msg){} does not work either.
What can I do to address this?
Rumen
Telerik team
 answered on 23 Jan 2012
1 answer
109 views

Kinda new to telerik.

I have a page with a windowmanager, radwindow, and a customcontrol on it.

the customcontrol uses javascript to open the control on the parent page like so

function UseRadWindowOnParentPage(DialogURL,RadWindowID, Width, Height, Title, argument) {
    var oManager = GetRadWindowManager();
    var oWnd = oManager.GetWindowByName(RadWindowID);
    oWnd.Show();
    oWnd.SetSize(Width, Height);
    oWnd.SetUrl(DialogURL);
    oWnd.SetTitle(Title);
    oWnd.Center();
    oWnd.argument = argument;
 
    oWnd.OnClientClose = function () {
        alert('client close');
    }
}

 

 

oWnd.OnClientClose never fires.
Any idea whats going on?

If i set the OnClientClose property in the radwindow control it works. The radwindow is used several times and not everything is supposed to have a onclientclose event.

I know I could add a radwindow for every popup I need but I got it this far and would prefer to reuse 1 radwindow rather than adding 6 radwindows where the only real difference is the OnClientClose

http://www.telerik.com/help/aspnet/window/radwindowobjectclientside.html so far, most everything I have tried from this link works.

thanks

 

 

Marin Bratanov
Telerik team
 answered on 23 Jan 2012
9 answers
1.8K+ views
Hi,

I have an ASPX page like this:
<head runat="server">  
    <title></title>  
        <script type="text/javascript">  
    function Test() {  
        PageMethods.TestIT();  
        alert("done");  
    }  
</script> 
 
</head> 
 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager runat="server" EnablePageMethods="True">  
    </telerik:RadScriptManager> 
 
<button onclick="Test(); return false;">tet</button><br />      
    </div> 
    </form> 
</body> 
</html> 
 
This runs fine.

Now I tried to achive the same thing in a masterpage like this;
<head runat="server">  
    <title></title>  
    <script type="text/javascript">  
    function Test() {  
        PageMethods.TestIT();  
        alert("done");  
    }  
</script> 
 
    <asp:ContentPlaceHolder ID="head" runat="server">  
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <telerik:RadScriptManager runat="server" EnablePageMethods="True">  
    </telerik:RadScriptManager> 
 
    <div> 
    <button onclick="Test(); return false;">tet</button><br /> 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
          
        </asp:ContentPlaceHolder> 
    </div> 
    </form> 
 
This results in "Microsoft JScript runtime error: 'PageMethods' is undefined"

What do I have to change to enable the things in a masterpage?

Regards

Manfred
Mich Meow
Top achievements
Rank 1
 answered on 23 Jan 2012
4 answers
163 views
Hi,

I'd like to populate a multicolumn combobox from a datatable, however the examples only seem to show how to do this using the SessionDataSource item. How would I do this with just  simple datatable?

Cheers,
Christian
Christian
Top achievements
Rank 1
 answered on 23 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?