protected void Page_Load(object sender, EventArgs e)
{
RadMenu1.EnableEmbeddedScripts = false;
ScriptReference referenceCore = AddJSReference("Telerik.Web.UI.Common.Core.js", false, RadMenu1);
Page.ClientScript.RegisterClientScriptInclude(referenceCore.Name, referenceCore.Path);
ScriptReference referenceQuery =AddJSReference("Telerik.Web.UI.Common.jQuery.js", false, RadMenu1);
Page.ClientScript.RegisterClientScriptInclude(referenceQuery.Name, referenceQuery.Path);
ScriptReference referenceQueryPlugin = AddJSReference("Telerik.Web.UI.Common.jQueryPlugins.js", false, RadMenu1);
Page.ClientScript.RegisterClientScriptInclude(referenceQueryPlugin.Name, referenceQueryPlugin.Path);
ScriptReference referenceNavigationScripts = AddJSReference("Telerik.Web.UI.Common.Navigation.NavigationScripts.js", false, RadMenu1);
Page.ClientScript.RegisterClientScriptInclude(referenceNavigationScripts.Name, referenceNavigationScripts.Path);
ScriptReference referenceRadMenuScripts = AddJSReference("Telerik.Web.UI.Menu.RadMenuScripts.js", false, RadMenu1);
Page.ClientScript.RegisterClientScriptInclude(referenceRadMenuScripts.Name, referenceRadMenuScripts.Path);
}
public ScriptReference AddJSReference(string scriptName, bool IsExecutingAssembly, Control objectControl)
{
string[] Names;
string DLLName;
string VersionNumber;
string Culture;
string PublicKeyToken;
ScriptReference reference = new ScriptReference();
reference.Name = scriptName;
if (IsExecutingAssembly)
reference.Assembly = Assembly.GetExecutingAssembly().FullName;
else
reference.Assembly = Assembly.GetAssembly(objectControl.GetType()).FullName;
Names = reference.Assembly.Split(',');
DLLName = Names[0].Replace("\\", "");
VersionNumber = Names[1].Split('=')[1].Replace("\\", "");
Culture = Names[2].Split('=')[1].Replace("\\", "");
PublicKeyToken = Names[3].Split('=')[1].Replace("\\", "");
reference.Path = "~/MyScriptHandler.ashx?Assembly=" + DLLName +
"&VersionNumber=" + VersionNumber +
"&Culture=" + Culture +
"&PublicKeyToken=" + PublicKeyToken +
"&ResourceName=" + reference.Name;
return reference;
}
After running this page MenuItems are not appearing on click of main menu. Please suggest some sample code or work around to get rid of this issue.
<telerik:RadWindow ID="radUserManager" runat="server" NavigateUrl="UserManager.aspx" Height="500" Width="950" Modal=true Style="z-index: 7001" Behaviors="Close, Reload" Top="-500px"></telerik:RadWindow><telerik:RadButton ID="cmdCancel" runat="server" Skin="Windows7" Text="Cancel" Width="75px" OnClientClick="CloseWindow(); return false;" > </telerik:RadButton>function GetCommentRadWindow() { var oWnd = GetRadWindowManager().getWindowByName("radUserManager"); return oWnd; } function CloseWindow() { GetCommentRadWindow().close(); }<ItemTemplate> US <%# DataBinder.Eval(Container.DataItem, "AmountUSD", "{0:$####}")%> = <%# DataBinder.Eval(Container.DataItem, "Code") %> <%# DataBinder.Eval(Container.DataItem, "AmountLocal", "{0:$####}") %></ItemTemplate>
I'm new to Telerik controls but really appreciate them and have surprised myself by my progress so far. Nevertheless I have a problem which is driving me up the wall although it's probably fairly simple to solve.
I'm using RadAjaxManager with 3 panels in a hierarchy (not nested but dependent upon one another for data):
Panel1 Contains a category selector
Panel2 Contains the list that results from changing the category in Panel 1.
Panel3 Contains the details when a list item from panel 2 is clicked.
So in the RadAjaxManager: Panel 1 is set to update Panel 2 and Panel 2 is set to update Panel 3.
So far so good. Everything works fine except that Panel 3 contains a google map which, if the user clicks a new category in Panel 1, disappears. I am assuming that this is because Panel 1 updates Panel 2 and since Panel 2 is changed it is 'forced' to update Panel 3. I don't want this to happen because I'm pretty sure it's responsible for the map's disappearance.
In any case there is no need for Panel 1 to update Panel 3. But how do I stop this 'cascade' happening?
I have tried using ajaxRequestWithTarget from a control in Panel 2 to try to avoid any updates from panel 2 updating panel 3 but so far without success. Plus I only have a vague understanding of how this works and in addition I need to run a client script after the request completes (to redraw the map after the ajax has passed the coordinates back to the page) but I don't see any way to do this since OnResponseEnd doesn't get called in this scenario.
I'm sure this is a fairly common situation. I really hate to post in forums until I've spent hours looking for solutions to similar problems in forums. Believe me that I have now spent hours!
Any pointers at all appreciated.
Steve