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

[Solved] How to open a RadWindow on click of a image in radgrid ?

2 Answers 215 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 11 Jun 2009, 09:07 AM
hi,

In my radGrid I am having a image column ( Declared in ItemTemplate of grid).
on click of that image I want to open a  radWindow. The page I want to open in raWindow is Teat.aspx

How can I achieve this?

Thanks,

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jun 2009, 09:51 AM
Hi Ram,

Try the following approach in order to show radwindow on clicking the image which is placed in ItemTemplate of grid.

ASPX:
 
 . . . 
<telerik:GridTemplateColumn UniqueName="Image"
    <ItemTemplate> 
        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Window1.gif" />                          
    </ItemTemplate> 
</telerik:GridTemplateColumn> 
 . . . 

CS:
 
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    if (e.Item is GridDataItem) 
    { 
        Image image1 = (Image)e.Item.FindControl("Image1"); 
        image1.Attributes["onclick"] = "return ShowForm();"
    } 

JavaScript:
 
<script type="text/javascript"
function ShowForm() 
    window.radopen("Test.aspx"""); 
</script> 
Note: Add RadWindowManager to page.

-Shinu.
0
Ram
Top achievements
Rank 1
answered on 11 Jun 2009, 02:07 PM
Thanks for the reply,

the page is opening in new window but the properties what ever defined in RadWindowManager are not applying to my Test.aspx page.

actually my Test.aspx page contains a user control and I am opening test.aspx in radwindow, why the properties are not applying to the page.
Tags
Window
Asked by
Ram
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ram
Top achievements
Rank 1
Share this question
or