Hello,
I am implementing RadWindow in a user control that will pop up context sensitive help whenever the user clicks an icon. The intention is that I will drop the user control anywhere on a page that requires it (i.e. multiple instances on the one page).
I have set up a hidden field on the user control so that each time it is dropped onto the page I can set the value of the field which is then used by the control to determine which help data to load.
The problem is that it seems the window the control uses is shared across all instances and it is unable to store the value independent of one another (therefore the same help text appears each time regardless of which help control is clicked).
Here is my Help Control code:
Then all I do on the page where the control is dropped is set the hidden field value:
However all that happens is that the first value only is used each time the window is opened.
Thoughts?
Andrew
I am implementing RadWindow in a user control that will pop up context sensitive help whenever the user clicks an icon. The intention is that I will drop the user control anywhere on a page that requires it (i.e. multiple instances on the one page).
I have set up a hidden field on the user control so that each time it is dropped onto the page I can set the value of the field which is then used by the control to determine which help data to load.
The problem is that it seems the window the control uses is shared across all instances and it is unable to store the value independent of one another (therefore the same help text appears each time regardless of which help control is clicked).
Here is my Help Control code:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Help.ascx.cs" Inherits="Controls_Generic_Help" %>
<
script
type
=
"text/javascript"
>
function openHelpWindow(sender, args) {
var radWindow = $find("<%=radWindow1.ClientID%>");
var docId = $get("<%= documentIdField.ClientID%>").value;
radWindow.setUrl("help.aspx?Id=" + docId);
radWindow.show();
}
</
script
>
<
telerik:RadButton
id
=
"helpButton"
runat
=
"server"
autopostback
=
"false"
Width
=
"16"
Height
=
"16"
onclientclicked
=
"openHelpWindow"
>
<
Image
EnableImageButton
=
"true"
ImageUrl
=
"~/images/icon-help.png"
IsBackgroundImage
=
"false"
/>
</
telerik:RadButton
>
<
telerik:radwindow
id
=
"radWindow1"
runat
=
"server"
Width
=
"600px"
Height
=
"600px"
VisibleTitlebar
=
"false"
></
telerik:radwindow
>
<
asp:HiddenField
runat
=
"server"
ID
=
"documentIdField"
/>
Then all I do on the page where the control is dropped is set the hidden field value:
Help1.HelpDocName = "HelpQuickLinksNavigator";
Help2.HelpDocName = "HelpActivityFeed";
However all that happens is that the first value only is used each time the window is opened.
Thoughts?
Andrew