Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
313 views
I have created a sample page which is demonstrating the problem I am encountering.  When you click the link on the page, it opens a radwindow.  Within that radwindow, if you click on the link titled 'close me with argument' the window is closed with an argument, the javascript validates the argument then the page does a postback and the server time is displayed on the page.  (I have a radgrid on the page, as this emulates what I am actually doing on my live page).  Then after the page has posted back, if you open the radwindow again and simply close the window (click the X on the toolbar) the argument is still passed to the javascript function.  How can i prevent this from happening?  Below is my sample project using version Q3 2008.  Thanks for your help!

Test.aspx (load me)

<%@ Page language="VB" CodeFile="test.aspx.vb" AutoEventWireup="false" Inherits="_test" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <title></title> 
    
    <script type="text/javascript"> 
    function ShowDeleteForm() 
    { 
        window.radopen("test2.aspx", "AdWindow"); 
    } 
     
 
    function OnClientClose(oWnd) 
    { 
        //get the transferred arguments 
        var arg = oWnd.argument; 
        if(arg) 
        { 
            if (arg.Value == 'true') { 
                __doPostBack("<%=RadGrid1.UniqueID%>", 'DeleteAd;12345');   
            } 
        } 
    }     
 
 
    </script>   
     
</head> 
<body> 
    <form runat="server" id="mainForm" method="post"> 
        <asp:ScriptManager id="ScriptManager1" runat="server" /> 
 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista"> 
            <Windows> 
                <telerik:RadWindow Skin="Vista" ID="AdWindow" runat="server" Height="200px" Width="400px" 
                    Left="150px" ReloadOnShow="true" Modal="true" VisibleStatusbar="false" OnClientClose="OnClientClose" ShowContentDuringLoad="false" /> 
            </Windows> 
        </telerik:RadWindowManager> 
 
 
            <telerik:RadAjaxPanel  
                ID="RadAjaxPanel1"  
                runat="server" 
                LoadingPanelID="LoadingPanel1"> 
                    <asp:UpdatePanel ID="UpdatePanel3" runat="server"> 
                        <ContentTemplate> 
                            <telerik:RadGrid ID="RadGrid1" runat="server"> 
                            </telerik:RadGrid>    
 
                            <asp:Literal ID="ltlContent" runat="server"></asp:Literal> 
                            <br /><br /> 
                            <a href="javascript:ShowDeleteForm();">click me</a> 
                             
                        </ContentTemplate>                                                                 
                    </asp:UpdatePanel>                                                                 
            </telerik:RadAjaxPanel> 
            <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="35" BackColor="#E0E0E0"> 
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'  
                    style="margin-top: 50px; margin-left: 0px; position:relative;" /> 
            </telerik:RadAjaxLoadingPanel>         
 
 
    </form> 
</body> 
</html> 
 

Test.aspx.vb

Partial Class _test 
    Inherits System.Web.UI.Page 
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        If IsPostBack Then 
            Dim passedArgument As String = Request.Params.[Get]("__EVENTARGUMENT") 
            If Not (passedArgument Is Nothing) And passedArgument <> "" Then 
                If passedArgument.IndexOf("DeleteAd") <> -1 Then 
                    Dim strArray As String() 
                    strArray = passedArgument.Split(";") 
                    postVal(strArray(1)) 
                End If 
            End If 
        End If 
    End Sub 
 
    Private Sub postVal(ByVal strVal As String) 
        ltlContent.Text = Date.Now & " - " & strVal 
        RadGrid1.Rebind() 
    End Sub 
End Class 

Test2.aspx

<%@ Page language="VB" AutoEventWireup="false" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <title></title> 
    
    <script type="text/javascript"> 
        function GetRadWindow() 
        { 
            var oWindow = null; 
            if (window.radWindow) oWindow = window.radWindow; 
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
            return oWindow; 
        } 
     
 
        function returnToParent(val) 
        { 
            var oArg = new Object(); 
            oArg.Value = val; 
 
            var oWnd = GetRadWindow(); 
            
            oWnd.argument = oArg;   
            oWnd.close(); 
        } 
 
 
    </script>   
     
</head> 
<body> 
    <form runat="server" id="mainForm" method="post"> 
 
        <a href="javascript:returnToParent('true');">close me with argument</a> 
 
    </form> 
</body> 
</html> 


Georgi Tunev
Telerik team
 answered on 13 Feb 2009
1 answer
165 views
When someone selects an item in a combobox, I need to conditionally load 5 comboboxes with the same list of information. 

In the examples I saw, I was able to get this to work with 1 however I'm trying to find a more efficient way to deal with this problem.  Each RadComboBox has an OnItemsRequested which is used to populate the items, how can I have all of the 5 comboboxes load the same list without populating the datatable for each request?  Is there a way to have all of the comboboxes use 1 event for OnItemsRequested and populate all of my comboboxes without seperate calls to the database to fill my datatable and do the binding?

Thanks
Princy
Top achievements
Rank 2
 answered on 13 Feb 2009
3 answers
118 views
hi


i want to add sliding panes into left and bottom sides of the splitter.

can i add in this way.

thanx.
Tsvetie
Telerik team
 answered on 13 Feb 2009
1 answer
135 views
Hi,

I have numerous radnumeric controls. i also have some required field validators for each of the controls. the form is shown via a radinwdow manager. problem is when the page is loaded with initial values and when i enter a blank value for the new value, the expected outcome must be that the required field validator would fire. instead, the validator did not fire causing the page to proceed with an invalid value. i noticed that the asp.net validators where not able to get the new value and instead used the old value. debugging the code also showed that the .Value and .Text properties of the radinput contains the old value instead of the newly entered one.

i have my submit buttons set to CausesValidation="false" and I trigger the validation by calling the this.Validate method and checking the Page.IsValid properties (which returns always true).

Thanks again,

Ely
Pavlina
Telerik team
 answered on 13 Feb 2009
3 answers
159 views
I am trying the Q3 version of the rad controls, working with radeditor trying to save the content to an external .html file.  When the page loads I put text into the editor and it correctly saves the .html file.  I go back to another page and then reload the editor page and the .html file will not load into the editor.  I am using the Q3 version of the rad controls, VS 2005, VB, and ASP.NET 2.0.  I have used the code from the demo pages excluding the Namespace line because I get an error in the Page_Load sub that radeditor.content is not a shared member.  Not sure how to fix this, or if I can use this if I'm not using .NET 3.5 and VS 2008.
Tervel
Telerik team
 answered on 13 Feb 2009
2 answers
155 views
Hi

I have a RadComboBox populated from Page_Load with countries and flags inside an UpdatePanel. They display correctly on first load, but after a postback all images become broken links. I have tried using both the standard asp UpdatePanel and the telerik RadAjaxPanel but both give the same behavior. Any solution to this?

Forgive me if this was answered somewhere else, I looked but couldn't find it.
Robert Enestedt
Top achievements
Rank 1
 answered on 13 Feb 2009
1 answer
83 views
I am trying to use the RadTreeContextMenu on a page which uses a master page.  The master page creates the left navigation menu and a title bar across the top. The problem occurs when I activate the RadTreeContextMenu, the menu appears but it is offset to the right the same number of pixels as the width of the menu bar that the master page is drawing. 

I think the issue involves using the actual location of the click event on the screen to determine the x,y position but it is not taking into consideration the left navigation that is rendered by the Master page when drawing the RadTreeContextMenu. Functionally everything is fine but it looks terrible. Has anyone had this problem and is there a known work around.

Thanks
Yana
Telerik team
 answered on 13 Feb 2009
1 answer
151 views
We have used the Rad Editor with Spell Check enabled in one of our web applications and the users are complaining about the spell check being inadequate.  The spell check sometimes does not pick up spelling mistakes.  Sometimes when it picks up the mistakes it does not suggest relevant words.

For example, if the user typed -
This ia a littke mesteke.

The spell check does not pick up the second word - "ia".
The spell check does pick up the fourth word but does not suggest the right word which is "little".

Is there a way to add a much verbose dictionary to the spell check engine?

Regards,
Raj
Rumen
Telerik team
 answered on 13 Feb 2009
1 answer
351 views
Hi all,
I want to disable  viewstate property of  combo box. if i did, i cannot fill the combobox inside the isnotpostback of page load.
if i fill out of the ispostback, i cannot preserve the selected data of the combo box. 
how can i solve this  problem.? pls help me.
Shinu
Top achievements
Rank 2
 answered on 13 Feb 2009
2 answers
354 views

Hi All,

I have  a  auto generator column grid, now i want to set horizontal align for columns , each column has different alignment depending on condition.

Please help me to fix my problem.

Thanks,
Amol
Amol
Top achievements
Rank 2
 answered on 13 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?