Hello
I’m using RadScheduler and I’m getting an error when I hit the snooze button the second time. I have past appointments that I snooze for 5 minutes but then, the reminder dialog pops up again immediately (did not wait 5 minutes) and it gives an error that says “Error: Object doesn't support property or method 'clone'”
Please see pictures attached
Your help will be apprecited
Thanks
how could disable the option to not be able to click on the Timeslot, where it creates the appointment.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrgChartControl.ascx.cs" Inherits="RadOrgChartTest.OrgChartControl" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<div>
<telerik:RadOrgChart runat="server" ID="RadOrgChart1" Skin="Office2007">
<ItemTemplate>
<asp:ImageButton ID="ZoomToButton" runat="server"
Style="cursor: pointer"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>'
OnClick="ZoomToButton_OnClick"
Visible='<%#Eval("NotLastClicked")%>' />
</ItemTemplate>
</telerik:RadOrgChart>
</div>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RadOrgChartTest
{
public partial class OrgChartControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
update(0);
}
private void update(int LastClicked)
{
RadOrgChart1.DataTextField = "Label";
RadOrgChart1.DataFieldID = "Id";
RadOrgChart1.DataFieldParentID = "Parent";
RadOrgChart1.DataSource = GetDataFromDatabase(LastClicked);
RadOrgChart1.DataBind();
}
protected void ZoomToButton_OnClick(object sender, EventArgs e)
{
update( int.Parse(((ImageButton)sender).CommandArgument));
}
private class FakeData
{
public string Label {get;set;}
public int Id {get;set;}
public int? Parent {get;set;}
public bool NotLastClicked {get;set;}
}
private List<FakeData> GetDataFromDatabase(int LastClicked)
{
List<FakeData> r = new List<FakeData>();
r.Add(new FakeData { Label = "Parent", Id = 1, Parent = null, NotLastClicked = LastClicked!= 1 });
r.Add(new FakeData { Label = "Node a", Id = 2, Parent = 1, NotLastClicked = LastClicked != 2 });
r.Add(new FakeData { Label = "Node b", Id = 3, Parent = 1, NotLastClicked = LastClicked != 3 });
r.Add(new FakeData { Label = "Node c", Id = 4, Parent = 1, NotLastClicked = LastClicked != 4 });
r.Add(new FakeData { Label = "Node d", Id = 5, Parent = 1, NotLastClicked = LastClicked != 5 });
return r;
}
}
}
<
add
key
=
"Telerik.Web.UI.StyleSheetFolders"
value
=
"~/_Resources/CSS/"
/>
<
add
key
=
"Telerik.Skin"
value
=
"IntranetSkin"
/>
<
add
key
=
"Telerik.EnableEmbeddedSkins"
value
=
"false"
/>
<
add
key
=
"Telerik.EnableEmbeddedBaseStylesheet"
value
=
"false"
/>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
EnableStyleSheetCombine
=
"true"
>
<
StyleSheets
>
<
telerik:StyleSheetReference
Path
=
"~/_Resources/CSS/base.css"
/>
<
telerik:StyleSheetReference
Path
=
"~/_Resources/CSS/start/jquery-ui-1.8.15.custom.css"
/>
<
telerik:StyleSheetReference
Path
=
"~/_Resources/CSS/styles.css"
/>
<
telerik:StyleSheetReference
Name
=
"Telerik.Web.UI.Skins.Menu.css"
Assembly
=
"Telerik.Web.UI"
/>
<
telerik:StyleSheetReference
Name
=
"Telerik.Web.UI.Skins.Grid.css"
Assembly
=
"Telerik.Web.UI"
/>
</
StyleSheets
>
</
telerik:RadStyleSheetManager
>
<
div
class
=
"ui-state-default ui-corner-all"
>
<
span
class
=
"ui-icon ui-icon-circle-zoomin"
></
span
>
</
div
>
.ui-state-default .ui-icon { background-image: url(images/ui-icons_e0fdff_256x240.png); }
<
link
type
=
"text/css"
href
=
"~/_Resources/CSS/start/jquery-ui-1.8.15.custom.css"
rel
=
"Stylesheet"
/>
'a holder for the current month
Dim
currentMonth =
""
'a holder for the count
Dim
count = -1
Dim
rangeTable
As
New
DataTable
rangeTable.Columns.Add(
"Label"
)
rangeTable.Columns.Add(
"Position"
)
rangeTable.Columns.Add(
"Value"
)
Using myconn
As
New
SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings(
"connection"
).ToString)
myconn.Open()
Dim
cmd =
New
SqlCommand(sql, myconn)
Dim
reader = cmd.ExecuteReader()
While
reader.Read()
'if the currentMonth is new, then we add it to the data table for a range
If
Not
(currentMonth = (Format(reader(
"DateHour"
),
"MMMM"
)))
Then
currentMonth = Format(reader(
"DateHour"
),
"MMMM"
)
count = count + 1
End
If
rangeTable.Rows.Add(currentMonth, count, reader(
"PointAverage"
))
'Dim tempSeries As New ChartSeries
'tempSeries.SetValues(1, 2)
'chart.Series.Add(tempSeries)
End
While
myconn.Close()
End
Using
'using myconn
'add the range
chart.PlotArea.XAxis.AddRange(0, count, 1)
For
Each
i
As
DataRow
In
rangeTable.Rows
chart.PlotArea.XAxis(i(
"Position"
)).TextBlock.Text = i(
"Label"
)
Dim
tempSeries
As
New
ChartSeries
tempSeries.SetValues(i(
"Position"
), i(
"Value"
))
chart.Series.Add(tempSeries)
Next
<
script
type
=
"text/javascript"
>
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function CloseDialog() {
GetRadWindow().close();
}
</
script
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Soumettre ce ticket"
onclick
=
"Button1_Click"
OnClientClick
=
"CloseDialog()"
/>
<
input
type
=
"submit"
id
=
"Button1"
onclick
=
"CloseDialog();"
value
=
"Soumettre ce ticket"
name
=
"Button1"
/>