<telerik:RadMenuItem runat="server"
<Items><telerik:RadMenuItem> <ItemTemplate> <ContentTemplate> My code here.... </ContentTemplate>
<ItemTemplate>
</Items>
</telerik:RadMenuItem>
I am getting this error on the following code
The supplied instance is not of type Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable (ShopMaintenance.Scheduled+Task). Are you trying to add a wrong object or is the assembly not enhanced?
//Find all "Daily" tasks from the TaskPool table and populate the calendar with them
public static void Daily_Tasks(){
ShopMaintenanceEntityDiagrams context = new ShopMaintenanceEntityDiagrams();
IQueryable<TaskPool> query = from c in context.TaskPools
where c.Cycle == "Daily"
select c;
foreach (TaskPool taskpool in query)
{
int months = 12;
int days = DateTime.DaysInMonth(DateTime.Now.Year, months);
while (months > 0)
{
while (days > 0)
{
DateTime daily = new DateTime(DateTime.Now.Year, months, days, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
switch (daily.DayOfWeek)
{
case DayOfWeek.Saturday:
break;
case DayOfWeek.Sunday:
break;
default:
Calendar.Appointments.Add(new Calendar(taskpool.ID, taskpool.Name, taskpool.Notes, daily, daily.AddHours(1)));
Task task = new Task();
task.Id =
Guid.NewGuid().ToString();
task.TaskName = taskpool.Name;
task.TaskNotes = taskpool.Notes;
task.Start = daily;
task.End = daily.AddHours(1);
context.Add(task);
context.SaveChanges();
break;
}
days--;
}
if (months >= 1)
{
months--;
if (months != 0)
{
days =
DateTime.DaysInMonth(DateTime.Now.Year, months);
}
}
}
}
Any thoughts? Thanks!
Eric
When I create a recurring daily appointment series that lasts for multiple days, it does not show up for all those multiple days. It almost seems like RadScheduler stops displaying the series of appointments past the week that it was created in. The RecurrenceRule text in the database however contains the correct and intended information. The same thing happens if I create a recurring appointment that ends on a specific date. It somehow shows for only the week it was created in event though the RecurrenceRule text in the database contains the end date that was assigned to the series. For example:
DTSTART:20100927T120000Z DTEND:20100927T130000Z RRULE:FREQ=DAILY;COUNT=15;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SUHi, i try to update my Telerik DLL from "2009.1.402.20" to "2010.1.519.35" and having few issues, one of them is i try to open a RadWindow from my PageLoad event....
Everything is fine when i am open the RadWindow from a button but as soon as i try to open it automaticly from the page load event throught the RegisterStartupScript method i have an JS error " 'undefined' is null or not an object" see attachment for details
- Everything was fine with the previous version of the control
- Theres nothing in the code that could impact the functionnality because i use a brand new peoject with nothing else on it
- Doesn't matter if i am using the Window Script Manager or the RadScriptManager
- I suspect something in the control beacause in the JS error (see attachment) said error on line 3193... this it's weird because my html page result only have 148 lines....
To test this I have created a blank new WebProject and add the following code
Here's part of my CodeBehind Code :
protected void Page_Load(object sender, EventArgs e)
{
RadScriptManager.RegisterStartupScript(Page, Page.GetType(), "OpenDataSet", "ShowLanInsertForm();", true);
}
Here's part of my my HTML code :
<script type="text/javascript">
function ShowLanInsertForm()
{
radopen(
"http://www.telerik.com", "RadWindow1");
}
</script>
<
telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<
button onclick="ShowLanInsertForm(); return false;">open</button>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
<Windows>
<telerik:RadWindow
id="RadWindow1"
runat="server"
showcontentduringload="false"
width="400px"
height="400px"
title="Telerik RadWindow"
behaviors="Default">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<telerik:RadDatePicker ID="RadDatePicker10" runat="server" Width="140px" Skin="Forest">
<Calendar ID="Calendar1" runat="server" Skin="Forest">
<HeaderTemplate>
<div style="width: 100%; text-align: center; background-color: white;" >
<input id="Button1" type="button" value="Today" onclick="GoToToday()" />
</div>
</HeaderTemplate>
</Calendar>
</telerik:RadDatePicker>
Thank you,
Oren
