function OpenPopUp(val_real, vis) { var myWidth = 0, myHeight = 0; if (typeof (window.innerWidth) == 'number') { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } myWidth = myWidth / 2 - 150; myHeight = myHeight / 2 - 50; window.open('MyPage.aspx?Val=' + val_read, 'width=700,height=160,top=' + myHeight + ',left=' + myWidth) return false; }//This code is used to provide a reference to the radwindow "wrapper" function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well) return oWindow; } function CloseOnReload() { //alert("Dialog is about to close itself"); GetRadWindow().close(); RefreshParentPage(); } function RefreshParentPage() { //alert("Dialog is about to reload parent page"); GetRadWindow().BrowserWindow.location.reload(); } function RedirectParentPage(newUrl) { alert("Dialog is about to redirect parent page to " + newUrl); GetRadWindow().BrowserWindow.document.location.href = newUrl; } function CallFunctionOnParentPage(fnName) { alert("Calling the function " + fnName + " defined on the parent page"); var oWindow = GetRadWindow(); if (oWindow.BrowserWindow[fnName] && typeof (oWindow.BrowserWindow[fnName]) == "function") { oWindow.BrowserWindow[fnName](oWindow); } } function RefreshParentPageWithoutWarning() { GetRadWindow().BrowserWindow.document.forms[0].submit(); }Response.Write("<Script>return RefreshParentPageWithoutWarning();</script>")SavetoDB(Values) ScriptManager.RegisterStartupScript(Page, Me.GetType(), "", "RefreshParentPageWithoutWarning()", True)
<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons"
style="width:300px; height:300px; margin-left:10px; margin-top:30px;" ScrollDuration="500" FrameDuration="2000" ItemHeight="100" ScrollDirection="Up, Down"
ItemWidth="100">
<ItemTemplate>
</ItemTemplate>
</telerik:RadRotator >
cs:
Chart chart = new Chart():
// adding chart styles, etc.
RadRotator1.Items.Add(new RadRotatorItem(chart))
second option:
<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons"
style="width:300px; height:300px; margin-left:10px; margin-top:30px;" ScrollDuration="500" FrameDuration="2000" ItemHeight="100" ScrollDirection="Up, Down"
ItemWidth="100" OnItemCreated="RadRotator1_ItemCreated">
<ItemTemplate>
<asp:Chart ID="crtAlerts" runat="server" style="width:100px; Height:100px; margin-top:3px; margin-left:60px">
</asp:Chart
</ItemTemplate>
</telerik:RadRotator>
cs:
protected void RadRotator1_ItemCreated(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
{
Chart crtAlertsPerSZ = e.Item.FindControl("crtAlerts") as Chart;
//adding styles to the chart, etc..
}
In this case, OnItemCreated is not fired.
Is there a way to add asp.net chart control to rad rotator?
Thanks.
function employeePickerOnSuccessCallBack(employeeInfo) { var listbox = $find(<%= RadListBox1.ClientId %>); listbox.trackChanges(); var item = new window.Telerik.Web.UI.RadListBoxItem(); item.set_text(employeeInfo.name); item.set_value(employeeInfo.value); listbox.get_items().add(item); if (!employeeInfo.IsActive) { var liElement = item.get_element(); $(liElement).addClass("inactive"); } listbox.commitChanges();}I'm trying to implement dual listbox functionality that is nearly identical to the AJAX version of the code sample provided by Telerik:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/dual-listbox-functionality.aspx
However, I need to be able to select multiple rows to move between the two listboxes instead of one at a time as the sample does.
If I set AllowMultiRowSelection = true for both grids and then attempt to move all items form one grid to the other, I get a JavaScript error.:
Line: 4083 Error: Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: elementThe file that is throwing the error appears to be a Microsoft AJAX related scripting file:
// Name: MicrosoftAjax.debug.js // Assembly: System.Web.Extensions // Version: 4.0.0.0 // FileVersion: 4.0.30319.225 //----------------------------------------------------------------------- // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------- // MicrosoftAjax.js // Microsoft AJAX Framework.It appears that some part of the AJAX scripting doesn't like it that one of the grids suddenly has no records. I tried implementing buttons that move all items form one grid to the other via the code behind, and the JavaScript error still shows up.
Is there a fix or work around for this? I haven't been able to find one yet :-(
