Telerik Support,
I have one page that has a RadGrid with a GridHyperLinkColumn. When the user clicks the hyperlink, a second page with a RadRotator is opened up in a new browser window. Let's say I have 2 rows of data in the grid. If I click on the first link, the image displays as expected in the RadRotator. Next if I click on the second hyperlink, it should set no images for the RadRotator, but instead the RadRotator's datasource seems to somehow be cached and reloads the initially loaded image.
Vice versa creates a similar issue. Stop running the app and restart it. Click on the second hyperlink first and the RadRotator is displayed with no image. Next click on the first hyperlink and still no image is loaded. The expected result no matter what order is selected is for the first hyperlink to display an image in the RadRotator and the second hyperlink should not display an image in the RadRotator.
Here is a video reproducing the issue both ways with a simple example: http://screencast.com/t/2batqcc8
Here is the code for page 1
ImageList.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ImageList.aspx.vb" Inherits="TestBed.ImageList" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
></
telerik:RadAjaxManager
>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
AutoGenerateColumns
=
"false"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridHyperLinkColumn
DataTextField
=
"Text"
HeaderText
=
"Image"
Target
=
"_blank"
UniqueName
=
"Text"
DataNavigateUrlFormatString
=
"~\ImageViewer.aspx?image={0}"
DataNavigateUrlFields
=
"Image"
>
</
telerik:GridHyperLinkColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
</
form
>
</
body
>
</
html
>
ImageList.aspx.vb
Public
Class
ImageList
Inherits
System.Web.UI.Page
Private
Sub
RadGrid1_NeedDataSource(sender
As
Object
, e
As
Telerik.Web.UI.GridNeedDataSourceEventArgs)
Handles
RadGrid1.NeedDataSource
Dim
dt
As
New
DataTable
Dim
dr
As
DataRow
Dim
col
As
New
DataColumn(
"Image"
,
GetType
(
Boolean
))
dt.Columns.Add(col)
col =
New
DataColumn(
"Text"
,
GetType
(
String
))
dt.Columns.Add(col)
dr = dt.NewRow
dr(
"Image"
) =
True
dr(
"Text"
) =
"Image1"
dt.Rows.Add(dr)
dr = dt.NewRow
dr(
"Image"
) =
False
dr(
"Text"
) =
"Image2"
dt.Rows.Add(dr)
RadGrid1.DataSource = dt
End
Sub
End
Class
ImageViewer.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ImageViewer.aspx.vb" Inherits="TestBed.ImageViewer" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
></
telerik:RadAjaxManager
>
<
telerik:RadRotator
ID
=
"RadRotator1"
runat
=
"server"
RenderMode
=
"Lightweight"
DataSourceID
=
"XmlDataSource1"
Width
=
"215px"
Height
=
"100px"
ItemHeight
=
"32px"
FrameDuration
=
"2000"
ScrollDuration
=
"2000"
RotatorType
=
"Buttons"
>
<
ItemTemplate
>
<
div
class
=
"itemTemplate"
>
<
img
src
=
"<%# XPath("
SmallURL") %>" alt="" style="height: 100px; width: 100px;" onclick="SetImage('<%# XPath("LargeURL") %>');" />
</
div
>
</
ItemTemplate
>
<
ControlButtons
LeftButtonID
=
"img_left"
RightButtonID
=
"img_right"
></
ControlButtons
>
</
telerik:RadRotator
>
<
asp:XmlDataSource
ID
=
"XmlDataSource1"
runat
=
"server"
></
asp:XmlDataSource
>
</
div
>
</
form
>
</
body
>
</
html
>
ImageViewer.aspx.vb
Public
Class
ImageViewer
Inherits
System.Web.UI.Page
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
Dim
image
As
Boolean
=
CBool
(
Me
.Request.QueryString(
"image"
))
If
image
Then
XmlDataSource1.Data =
"<Data><DataItem><SmallURL>/Image1.jpg</SmallURL><LargeURL>/Image1.jpg</LargeURL></DataItem></Data>"
Else
XmlDataSource1.Data =
"<Data><DataItem><SmallURL></SmallURL><LargeURL></LargeURL></DataItem></Data>"
End
If
End
Sub
End
Class
Please help.
Thanks,
Rob