RadWindow with GridView

4 posts, 1 answers
  1. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 07 Apr 2010 Link to this post

    I dont know why I guess its because we are on IE6, but the normal GridView control is a lot quicker than the RadGrid retutning the same data, so I'm stuck with the GridView.

    I've implemented RadWindows to give me modal pop ups for data from the Gridview rows.

    But what is happening is this - with RadAjaxManager the pop up would only show once, I then removed the RadAjaxManager and the pop up appears once after a postback. ie on load it works, I then hit the buton again and the page postsback (no ajax) then the pop up works again.

    This is my code behind in the rowdataBound event:
     
                'SET UP BUTTON FUNCTIONS  
                'set View Demog button action  
                Dim ibd As ImageButton = CType(e.Row.FindControl("btnViewDemog"), ImageButton)  
                ibd.Attributes("href") = "#"  
                ibd.Attributes("onclick") = [String].Format("return ShowDemog('{0}');", e.Row.DataItem("id"))  
     
     And this is my client side javascript:
                function ShowDemog(id) {  
                    alert("Boo");  
                    window.radopen("ShowDemog.aspx?Patient_ID=" + id, "ShowDemog");  
                    return false;  
                } 

    In the pop up page after processing I call this:
    ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", True) 

    Any help would be appreciated

    Andy
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 12 Apr 2010 Link to this post

    Hello Andy,

    I am not quite sure that I understand your setup and logic completely. Could you please open a support ticket and send me a small sample project where the problem could be reproduced? I will check it right away and get back to you with a solution.


    Regards,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 16 Apr 2010 Link to this post

    Hello again Andy,

    I just answered your support ticket, Now I see that I've had the necessary info in your initial post, but I missed the problem - sorry about that.

    The reason for it is in the JavaScript function:
    function ShowDemog(id) { 
        alert("Boo"); 
        window.radopen("ShowDemog.aspx?Patient_ID=" + id, "ShowDemog"); 
        return false
    }

    In it, the name of the function and the name of the RadWindow are the same. What happens is:
    1. You click the button and the JavaScript function is executed
    2. A new object is created with ShowDemog as a name.
    3. When you click the button again, an error occurs because ShowDemog now is not a function but a JavaScript object and the page postbacks.
    4. Now the page is loaded again, and ShowDemog again is the name of a JavaScript function that could be executed.



    Best wishes,
    Georgi Tunev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 19 Apr 2010 Link to this post

    Fantastic - thank you.

    Andy
Back to Top