This is a migrated thread and some comments may be shown as answers.

RadWindow with GridView

3 Answers 112 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 07 Apr 2010, 09:12 AM
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

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 12 Apr 2010, 11:19 AM
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.
0
Accepted
Georgi Tunev
Telerik team
answered on 16 Apr 2010, 10:31 AM
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.
0
Andy Green
Top achievements
Rank 1
answered on 19 Apr 2010, 09:25 AM
Fantastic - thank you.

Andy
Tags
Window
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Andy Green
Top achievements
Rank 1
Share this question
or