<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Office2007" |
Height="551px" ShowFooter="false" ReadOnly="false" Localization-AdvancedCalendarToday="I dag" Localization-AdvancedCalendarCancel="Avbryt" |
Localization-AdvancedDescription="Beskrivelse" Localization-AdvancedDone="Fullfør" Localization-AdvancedSubject="Emne" |
TimeZoneOffset="00:00:00" WeekView-HeaderDateFormat="dd.MM.yyyy" |
DayStartTime="07:00:00" DayEndTime="21:00:00" Culture="nb-NO" |
FirstDayOfWeek="Monday" LastDayOfWeek="Friday" |
EnableDescriptionField="true" Localization-Show24Hours="Vi 24 timer" Localization-ShowBusinessHours="Vis arbeidstid" HoursPanelTimeFormat="HH.mm" |
DataSourceID="sqlAppointments" DataRecurrenceField="RecurrenceRule" DataDescriptionField="Description" |
DataEndField="EndTime" DataKeyField="ID" DataRecurrenceParentKeyField="RecurrenceParentID" DataStartField="StartTime" |
DataSubjectField="Subject" OnFormCreated="RadScheduler1_FormCreated" OnClientFormCreated="schedulerFormCreated" |
OnNavigationComplete="RadScheduler1_NavigationComplete" |
OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" |
OnAppointmentDelete="RadScheduler1_AppointmentDelete" |
OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" |
OnAppointmentInsert="RadScheduler1_AppointmentInsert"> |
<AdvancedForm Modal="true" /> |
<TimelineView UserSelectable="false" /> |
<AdvancedForm Modal="true" /> |
<AppointmentTemplate> |
<div class="rsAptSubject"> |
<%# Eval("Subject") %> |
</div> |
<%# Eval("Description") %> |
</AppointmentTemplate> |
<AdvancedEditTemplate> |
<scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" |
Subject='<%# Bind("Subject") %>' |
Description='<%# Bind("Description") %>' |
EventID='<%# Bind("ID") %>' |
Start='<%# Bind("Start") %>' |
End='<%# Bind("End") %>' |
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' |
UserID='<%# getUserID() %>' |
PartnerID='<%# getPartnerID() %>' /> |
</AdvancedEditTemplate> |
<AdvancedInsertTemplate> |
<scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" |
Subject='<%# Bind("Subject") %>' |
Start='<%# Bind("Start") %>' |
End='<%# Bind("End") %>' |
Description='<%# Bind("Description") %>' |
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' |
UserID='<%# getUserID() %>' |
PartnerID='<%# getPartnerID() %>' /> |
</AdvancedInsertTemplate> |
<TimeSlotContextMenuSettings EnableDefault="true" /> |
<AppointmentContextMenuSettings EnableDefault="true" /> |
</telerik:RadScheduler> |
<asp:SqlDataSource ID="sqlAppointments" runat="server" ConnectionString='<%$ ConnectionStrings:ConnectionString %>' |
SelectCommand="SELECT * FROM Appointments WHERE UserID = (SELECT TOP 1 UserID FROM User WHERE UserID_guid = @UserID) AND StartTime < EndTime" |
InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [UserID], [RecurrenceRule], [RecurrenceParentID], [Description]) VALUES (@Subject, @Start, @End, @UserID, @RecurrenceRule, @RecurrenceParentID, @Description)" |
> |
<SelectParameters> |
<asp:Parameter Name="UserID" /> |
</SelectParameters> |
<InsertParameters> |
<asp:Parameter Name="Subject" Type="String" /> |
<asp:Parameter Name="Start" Type="DateTime" /> |
<asp:Parameter Name="End" Type="DateTime" /> |
<asp:Parameter Name="UserID" Type="Int32" /> |
<asp:Parameter Name="RecurrenceRule" Type="String" /> |
<asp:Parameter Name="RecurrenceParentID" Type="Int32" /> |
<asp:Parameter Name="Description" Type="String" /> |
</InsertParameters> |
</asp:SqlDataSource> |
19 Answers, 1 is accepted


protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e) |
{ |
sqlAppointments.InsertParameters["End"].DefaultValue = e.Appointment.End.ToString(); |
sqlAppointments.InsertParameters["Start"].DefaultValue = e.Appointment.Start.ToString(); |
sqlAppointments.InsertParameters["UserID"].DefaultValue = UserID.ToString(); |
sqlAppointments.InsertParameters["Subject"].DefaultValue = e.Appointment.Subject.ToString(); |
sqlAppointments.InsertParameters["Description"].DefaultValue = e.Appointment.Description.ToString(); |
sqlAppointments.InsertParameters["RecurrenceRule"].DefaultValue = e.Appointment.RecurrenceRule.ToString(); |
try |
{ |
sqlAppointments.InsertParameters["RecurrenceParentID"].DefaultValue = Convert.ToInt32(e.Appointment.RecurrenceParentID.ToString()).ToString(); |
} |
catch(Exception exc) |
{ |
sqlAppointments.InsertParameters["RecurrenceParentID"].DefaultValue = "0"; |
} |
} |

private DataTable _colleagues; |
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)] |
public DataTable colleagues |
{ |
get |
{ |
if (_colleagues == null) |
_colleagues = getColleagues(); |
Session["colleagues"] = _colleagues; |
return _colleagues; |
} |
set |
{ |
_colleagues = getColleagues(); |
} |
} |
public DataTable getColleagues() |
{ |
//return selected colleagues: |
DataTable objDT = new DataTable("Colleagues"); |
objDT.Columns.Add("ID", Type.GetType("System.Int32")); |
objDT.Columns["ID"].AutoIncrement = true; |
objDT.Columns["ID"].AutoIncrementSeed = 1; |
objDT.Columns.Add("UserID", Type.GetType("System.String")); |
objDT.Columns.Add("Name", Type.GetType("System.String")); |
objDT.Columns.Add("Email", Type.GetType("System.String")); |
foreach (DataListItem item in dlColleagues.Items) |
{ |
CheckBox chk = (CheckBox)item.FindControl("chkUser"); |
if (chk.Checked) |
{ |
HiddenField hdnEmail = (HiddenField)item.FindControl("hdn1"); |
Label lbl = (Label)item.FindControl("lblNavn"); |
DataRow r = objDT.NewRow(); |
r["UserID"] = chk.ToolTip.ToString(); |
r["Name"] = lbl.Text.ToString(); |
r["Email"] = hdnEmail.Value.ToString(); |
} |
} |
return objDT; |
} |
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)] |
public DataTable Colleagues |
{ |
get |
{ |
return (DataTable)ResColleagues.colleagues; |
//return (DataTable)Session["colleagues"]; |
} |
set |
{ |
} |
} |
<scheduler:Colleagues runat="server" ID="ResColleagues" /> |
<telerik:RadScheduler runat="server" ID="RadScheduler1" CustomAttributeNames="colleagues" EnableCustomAttributeEditing="true" OnAppointmentInsert="RadScheduler1_AppointmentInsert" |
...> |
*** |
</...> |
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e) |
{ |
sqlAppointments.InsertParameters["End"].DefaultValue = e.Appointment.End.ToString(); |
sqlAppointments.InsertParameters["Start"].DefaultValue = e.Appointment.Start.ToString(); |
sqlAppointments.InsertParameters["UserID"].DefaultValue = UserID.ToString(); |
sqlAppointments.InsertParameters["Subject"].DefaultValue = e.Appointment.Subject.ToString(); |
sqlAppointments.InsertParameters["Description"].DefaultValue = e.Appointment.Description.ToString(); |
sqlAppointments.InsertParameters["RecurrenceRule"].DefaultValue = e.Appointment.RecurrenceRule.ToString(); |
try |
{ |
sqlAppointments.InsertParameters["RecurrenceParentID"].DefaultValue = Convert.ToInt32(e.Appointment.RecurrenceParentID.ToString()).ToString(); |
} |
catch(Exception exc) |
{ |
sqlAppointments.InsertParameters["RecurrenceParentID"].DefaultValue = "0"; |
} |
try |
{ |
//iterate the selected colleague |
DataTable dt = (DataTable)e.Appointment.Attributes["colleagues"]; |
//DataTable dt = (DataTable)Session["colleagues"]; |
foreach (DataRow r in dt.Rows) |
{ |
string name = r["Name"].ToString(); |
} |
} |
catch (Exception exc) |
{ |
} |
} |
If you need to display Colleagues as a checkbox list in the advanced form, you should consider creating a multi-valued resource type. Multi-valued resources are only supported via a special provider:
http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaproviderthatsupportsmultivaluedresources.html
Once you create your provider for multi-valued resources you can use it to replace the XmlSchedulerProvider from this kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/sample-project-of-the-customizing-the-advanced-template-example.aspx
The user control which will display your Colleagues checkbox list is MultipleValuesResourceControl.
Also, you should keep in mind that any resource type your create requires a separate data source. You cannot use the same data source to populate both appointments and resources. Here is a demo to use for reference:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/multipleresourcevalues/defaultcs.aspx
If for some reason you cannot separate the resource data source from that of the appointment's data source you can use the following workaround:
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/group-by-in-timeline-view.aspx#895330
Regards,
Peter
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

public abstract class DbSchedulerProviderBase : SchedulerProviderBase |
{ |
public override bool SupportsMultipleResourceValues { get { return true; } } |
protected DbProviderFactory DbFactory { get { ... }; set { ... }; } |
protected bool PersistChanges { get { ... }; set { ... }; } |
protected string ConnectionString { get { ... }; set { ... }; } |
public override void Initialize(string name, NameValueCollection config) { ... } |
protected virtual DbConnection OpenConnection() { ... } |
protected virtual DbParameter CreateParameter(string name, object value) { ... } |
} |
using (DbConnection conn = OpenConnection())
protected override DbConnection OpenConnection() |
{ |
SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["MyConnectionString"].ToString()); |
return conn; |
} |
Thanks in advance.
The help article is missing an important bit of information - you need to configure the provider and assign a connection string through web.config.
<
telerik.web.ui
>
<
radScheduler
defaultAppointmentProvider
=
"Integrated"
>
<
appointmentProviders
>
<
add
name
=
"SchedulerData"
type
=
"Telerik.Web.Examples.Scheduler.MyDbSchedulerProvider"
connectionStringName
=
"TelerikConnectionString"
persistChanges
=
"true"
/>
</
appointmentProviders
>
</
radScheduler
>
</
telerik.web.ui
>
More information on how to configure the provider is available here:
http://www.telerik.com/help/aspnet-ajax/schedule_databindingusingadataprovider.html
With the configuration in place you should no longer receive the error messages.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

<telerik.web.ui> |
<radScheduler defaultAppointmentProvider="Integrated"> |
<appointmentProviders> |
<add name="SchedulerData" type="Colleague" connectionStringName="MyConnectionString" persistChanges="true"/> |
</appointmentProviders> |
</radScheduler> |
</telerik.web.ui> |
did not do the trick. Or (and this is probably it), there is still some details which I have failed to include.

protected override DbConnection OpenConnection() |
{ |
SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["MyConnectionString"].ToString()); |
conn.Open(); |
return conn; |
} |

The reason why the users wasn't generated was that I had forgot to declare the Type-parameter in the user control. By setting Type="Colleague" the users were visible. Perfect!
Doing dynamic filtering of the available resources in the advanced form won't be very easy, but it's possible with customized template. More details on how to customize the advanced template here:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx
Let us know if you have any outstanding issues with the provider.
All the best,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I am using the inbuilt AdvanceForm to insert/Edit the appointments. I have created a demo project same way which is working fine.
But when I tried to use the same in the real appilication, it is giving error. I haven't customized it. Appointments doesn't get inserted as all the fields Subject, Start, End, etc. returns null.
Here is the code.
<asp:SqlDataSource ID="SDSAppointments" runat="server" ConnectionString="<%$ appSettings:DBConn %>"
SelectCommand="SELECT [AppointmentId], [Subject], [Start], [End], [LessonTypeId], [InstructorId], [CustomerId], [RecurrenceRule], [RecurenceParentId], [Description], [IsInactive], [IsDelivered], [IsEdited], [IsDeleted], [FlightHours], [GroundHours], [Comments] FROM [Appointment] WHERE ([IsDeleted] = 0) And (InstructorId = @instructorId)" ProviderName="System.Data.SqlClient"
InsertCommand="INSERT INTO Appointment([Subject], [Start], [End], [LessonTypeId], [InstructorId], [CustomerId], [RecurrenceRule], [RecurenceParentId], [Description],[IsInactive],[IsDelivered], [IsEdited],[IsDeleted], [FlightHours], [GroundHours], [Comments]) VALUES (@Subject, @Start, @End, @LessonTypeId, @InstructorId, @CustomerId, @RecurrenceRule, @RecurenceParentId, @Description, @IsInactive, @IsDelivered, @IsEdited, @IsDeleted, @FlightHours, @GroundHours, @Comments)" >
<SelectParameters>
<asp:ControlParameter ControlID="HDNInstructorId" DefaultValue="0" Name="instructorId" PropertyName="Value" /> </SelectParameters>
<InsertParameters>
<asp:Parameter Name="Subject" DbType="String" />
<asp:Parameter Name="Start" DbType="DateTime" />
<asp:Parameter Name="End" DbType="DateTime" />
<asp:Parameter Name="LessonTypeId" DbType="Int32" />
<asp:Parameter Name="InstructorId" DbType="Int32"/>
<asp:Parameter Name="CustomerId" DbType="Int32" />
<asp:Parameter Name="RecurrenceRule" DbType="String"/>
<asp:Parameter Name="RecurenceParentId" DbType="String" />
<asp:Parameter Name="Description" DbType="String" />
<asp:Parameter Name="IsInactive" DbType="Int16"/>
<asp:Parameter Name="IsDelivered" DbType="Int16" />
<asp:Parameter Name="IsEdited" DbType="Int16"/>
<asp:Parameter Name="IsDeleted" DbType="Int16" />
<asp:Parameter Name="FlightHours" DbType="Int16"/>
<asp:Parameter Name="GroundHours" DbType="Int16" />
<asp:Parameter Name="Comments" DbType="Int16"/>
</InsertParameters></asp:SqlDataSource>
<asp:SqlDataSource ID="SDSStudents" runat="server" ConnectionString="<%$ appSettings:DBConn %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT DISTINCT InS.StudentID, C.FirstName + ' ' + C.LastName AS StudentName FROM InstructorStudents AS InS INNER JOIN Customer AS C ON InS.StudentID = C.CustomerID WHERE (InS.InstructorId = @instructorId)">
<SelectParameters>
<asp:ControlParameter ControlID="HDNInstructorId" DefaultValue="0" Name="instructorId" PropertyName="Value" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SDSLessonType" runat="server" ConnectionString="<%$ appSettings:DBConn %>"
ProviderName="System.Data.SqlClient" SelectCommand="Select Top 7 [CategoryID] ,[Name] from Category Where [ParentCategoryID]=0"></asp:SqlDataSource>
<div>
<asp:HiddenField ID="HDNInstructorId" runat="server" />
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataSourceID="SDSAppointments" AllowDelete="False" EnableDescriptionField="True" Height="500px" Width="650px" Skin="Telerik" SelectedView="WeekView" EnableReminderField="False" RecurrenceChoiceDialogDefaultRecurrenceMode="Series" ShowsConfirmationWindowOnDelete="True" DataEndField="End" DataDescriptionField="Description" DataKeyField="AppointmentId" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurenceParentId"
DataStartField="Start" DataSubjectField="Subject" onappointmentinsert="RadScheduler1_AppointmentInsert" CustomAttributeNames="FlightHours,GroundHours,Comments" EnableCustomAttributeEditing="True">
<AdvancedForm Modal="true" EnableCustomAttributeEditing="True" />
<ResourceTypes>
<telerik:ResourceType DataSourceID="SDSStudents" ForeignKeyField="CustomerId" KeyField="StudentID" Name="Students" TextField="StudentName" />
<telerik:ResourceType DataSourceID="SDSLessonType" ForeignKeyField="LessonTypeId" KeyField="CategoryID" ame="LessonType" TextField="Name" />
</ResourceTypes>
</telerik:RadScheduler>
Please reply as soon as possible.
Its Urgent..
thanks,
Roshani

Please reply soon.

SDSAppointments.InsertParameters[
"Subject"].DefaultValue = e.Appointment.Subject.ToString();
SDSAppointments.InsertParameters[
"Start"].DefaultValue = e.Appointment.Start.ToString();
SDSAppointments.InsertParameters[
"End"].DefaultValue = e.Appointment.End.ToString();
//SDSAppointments.InsertParameters["LessonTypeId"].DefaultValue = e.Appointment.Resources.GetResourceByType("LessonType").ToString();
SDSAppointments.InsertParameters[
"InstructorId"].DefaultValue=HDNInstructorId.Value;
//SDSAppointments.InsertParameters["CustomerId"].DefaultValue=e.Appointment.Attributes["CustomerId"].ToString();
SDSAppointments.InsertParameters[
"RecurrenceRule"].DefaultValue=e.Appointment.RecurrenceRule.ToString();
SDSAppointments.InsertParameters[
"RecurenceParentId"].DefaultValue=e.Appointment.RecurrenceParentID.ToString();
SDSAppointments.InsertParameters[
"Description"].DefaultValue = e.Appointment.Description.ToString();
SDSAppointments.InsertParameters[
"IsInactive"].DefaultValue = "0";
SDSAppointments.InsertParameters[
"IsDelivered"].DefaultValue = "0";
SDSAppointments.InsertParameters[
"IsEdited"].DefaultValue = "0";
SDSAppointments.InsertParameters[
"IsDeleted"].DefaultValue = "0";
SDSAppointments.InsertParameters[
"FlightHours"].DefaultValue =e.Appointment.Attributes["FlightHours"].ToString();
SDSAppointments.InsertParameters[
"GroundHours"].DefaultValue =e.Appointment.Attributes["FlightHours"].ToString();
SDSAppointments.InsertParameters[
"Comments"].DefaultValue = e.Appointment.Attributes["FlightHours"].ToString();
Here it is giving error for the other values that need to be stored.
We will be glad to help you, but we will need a working demo of the problem. This seems an issue with the data source you use to bind RadScheduler. To attach files, please open a support ticket and we will get back to you as soon as possible.
Best wishes,
Peter
the Telerik team

I have developed demo project which is working fine with smilar type of scenario. Now I am implementing the same thing with little changes in database. I have used sqldatasource control with the radscheduler. RadScheduler displys appointmnets also updates the IsDeleted field OnAppointmentDelete Event. I am just unable to Insert the appointment. I cann't provide the code as it is a hige application. So giving some more details here. I haven't customized the advancedForm. Code is already there in the above posts. Database Structure is as follows:
Appointment table fields and description
AppointmentId
Subject
Start
End
lessonTypeId
InstructorId
CustomerId
RecurrenceRule
RecurenceParentId
Description
IsInactive
IsDelivered
IsEdited
IsDeleted
FlightHours
GroundHours
Comments
ApplicationInfo Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Web.UI;
public class AppointmentInfo
{
#region "Private Variables"
private readonly string _id;
private string _Subject;
private DateTime _Start;
private DateTime _End;
private string _RecurrenceRule;
private string _RecurrenceParentId;
private Int32 _InstructorId;
private Int32 _CustomerId;
private Int32 _LessonTypeId;
private string _Description;
private int _IsDeleted;
private int _IsInactive;
private int _IsDelivered;
private int _IsEdited;
private Decimal _FlightHours;
private Decimal _GroundHours;
private string _Comments;
#endregion
#region "Properties"
public string Id
{
get { return _id; }
}
public string Subject
{
get { return _Subject; }
set { _Subject = value; }
}
public DateTime Start
{
get { return _Start; }
set { _Start = value; }
}
public DateTime End
{
get { return _End; }
set { _End = value; }
}
public string RecurrenceRule
{
get { return _RecurrenceRule; }
set { _RecurrenceRule = value; }
}
public string RecurrenceParentId
{
get { return _RecurrenceParentId; }
set { _RecurrenceParentId = value; }
}
public Int32 InstructorId
{
get { return _InstructorId; }
set { _InstructorId = value; }
}
public Int32 CustomerId
{
get { return _CustomerId; }
set { _CustomerId = value; }
}
public Int32 LessonTypeId
{
get { return _LessonTypeId; }
set { _LessonTypeId = value; }
}
public string Description
{
get { return _Description; }
set { _Description = value; }
}
public int IsDeleted
{
get { return _IsDeleted; }
set { _IsDeleted = value; }
}
public int IsInactive
{
get { return _IsInactive; }
set { _IsInactive = value; }
}
public int IsDelivered
{
get { return _IsDelivered; }
set { _IsDelivered = value; }
}
public int IsEdited
{
get { return _IsEdited; }
set { _IsEdited = value; }
}
public Decimal FlightHours
{
get { return _FlightHours; }
set { _FlightHours = value; }
}
public Decimal GroundHours
{
get { return _GroundHours; }
set { _GroundHours = value; }
}
public string Comments
{
get { return _Comments; }
set { _Comments = value; }
}
#endregion
private AppointmentInfo()
{
_id = Guid.NewGuid().ToString();
}
public AppointmentInfo(string subject, DateTime start, DateTime end, Int32 lessonTypeId, Int32 instructorId,
Int32 customerId, string recurrenceRule, string recurrenceParentID, string description, int isInactive,
int isDelivered, int isEdited, int isDeleted, decimal flightHours, decimal groundHours, string comments)
: this()
{
_Subject = subject;
_Start = start;
_End = end;
_LessonTypeId = lessonTypeId;
_InstructorId = instructorId;
_CustomerId = customerId;
_RecurrenceRule = recurrenceRule;
_RecurrenceParentId = recurrenceParentID;
_Description = description;
_IsInactive = isInactive;
_IsDelivered = isDelivered;
_IsEdited = isEdited;
_IsDeleted = isDeleted;
_FlightHours = flightHours;
_GroundHours = groundHours;
_Comments = comments;
}
public AppointmentInfo(Appointment source): this()
{CopyInfo(source);}
public void CopyInfo(Appointment source)
{
Subject = source.Subject;
Start = source.Start;
End = source.End;
RecurrenceRule = source.RecurrenceRule;
if (source.RecurrenceParentID != null)
{
RecurrenceParentId = source.RecurrenceParentID.ToString();
}
CustomerId = Convert.ToInt32(source.Attributes["CustomerId"].ToString());
InstructorId = Convert.ToInt32(source.Attributes["InstructorId"].ToString());
LessonTypeId = Convert.ToInt32(source.Attributes["LessonTypeId"].ToString());
Description = source.Description;
IsDeleted = Convert.ToInt32(source.Attributes["IsDeleted"].ToString());
IsInactive = Convert.ToInt32(source.Attributes["IsDeleted"].ToString());
IsDelivered = Convert.ToInt32(source.Attributes["IsDelivered"].ToString());
IsEdited = Convert.ToInt32(source.Attributes["IsEdited"].ToString());
FlightHours = Convert.ToDecimal(source.Attributes["FlightHours"].ToString());
GroundHours = Convert.ToDecimal(source.Attributes["GroundHours"].ToString());
Comments = source.Attributes["GroundHours"].ToString();
}
}
When I click on the "Save" button the form didn't get close. When I searched for the error "Insert Error. Connot insert null value in the column Subject." Same thing happens with all other fields.
Please reply as soon as possible.
Please, send us also your RadScheduler declaration and how you handle its AppointmentInsert/Delete/Updated events.
Kind regards,
Peter
the Telerik team

Thanks for replying,
The problem has been solved. Still I don't know the reason. By the way I have already attached it. you can found it in one of the above posts.

Iam using rad scheduler in one of my projects. I am using advancedinsert template and a user control in the insert template. When i save the event on clicking save button from user control , event gets added to database but i get an exception
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
Stack Trace:
|
The rad scheduler is as below
<telerik:RadScheduler runat="server" ID="RegScheduler" CssClass="RegScheduler"
SelectedView="MonthView" AllowDelete="false" AppointmentStyleMode="Default"
TimelineView-UserSelectable="false" CustomAttributeNames="EventStatus"
StartInsertingInAdvancedForm="True"
EnableCustomAttributeEditing="True" EnableExactTimeRendering="True" StartEditingInAdvancedForm="true"
EnableResourceEditing="False" AdvancedForm-EnableCustomAttributeEditing="True"
OnClientAppointmentsPopulating="appointmentsPopulating" OnClientAppointmentsPopulated="appointmentsPopulated"
OnClientDataBound="clientDataBound"
AllowEdit='<%# AllowCalendarEventEditing %>'
AllowInsert='<%# AllowCalendarEventEditing %>'>
<AdvancedForm Modal="true" />
<WebServiceSettings Path="Controls/Registration/Calendar/SchedulerWcfService.svc" />
<AdvancedEditTemplate>
<uc2:ManageEvent runat="server" ID="AdvancedEditForm1" Mode="Edit" SelectedCompanies='<%# SelectedCompanies %>' CalendarMode='<%# CalendarMode %>' CurrentTimeZone='<%# CurrentTimeZone %>' />
</AdvancedEditTemplate>
<AdvancedInsertTemplate>
<uc2:ManageEvent runat="server" ID="AdvancedInsertForm1" Mode="Insert" SelectedCompanies='<%# SelectedCompanies %>' CalendarMode='<%# CalendarMode %>' CurrentTimeZone='<%# CurrentTimeZone %>' StartDateTime='<%# Bind("Start") %>' EndDateTime='<%# Bind("End") %>' />
</AdvancedInsertTemplate>
But when i reload the calendar i see the event added. can you please advice on what to look at?
How can i avoid the exception?
Thanks
Ramya
I have answered to your request in the other forum thread you have opened on this subject. I recommend to continue our conversation in one thread so possible misunderstanding could be avoided.
Kind regards,
Ivana
the Telerik team