Hi,
I want to open Radwindow while clicking on asp:Image within Templatecolumn in Radgrid.
I have pasted my code below.
please help me to get this done.
Thanks in advance.
Regards,
AGM Raja
I want to open Radwindow while clicking on asp:Image within Templatecolumn in Radgrid.
I have pasted my code below.
please help me to get this done.
Thanks in advance.
aspx:
<
telerik:GridTemplateColumn HeaderText
=
"Image"
UniqueName
=
"image_file_location"
>
<
ItemTemplate
>
<
asp:Image
ID
=
"ImgSign"
Width
=
"70"
Height
=
"80"
runat
=
"server"
ImageUrl
=
"test.png"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
c#:
protected void RadGrid_tab1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
DataRowView drv = (DataRowView)e.Item.DataItem;
GridDataItem item = (GridDataItem)e.Item;
Image img = (Image)item.Controls[0].FindControl("ImgSign");
string from=txt_test.Text;
string url = "test.png_"+from;
img.Attributes["onclick"] = "return ShowForm("+url+");";
}
}
Javascript:
<script type="text/javascript">
function ShowForm(url) {
alert(url);
window.radopen(url, "");
}
</script>
Regards,
AGM Raja