or
<
asp:Content
ID
=
"BodyContent"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
<
telerik:RadScheduler
ID
=
"RadScheduler1"
runat
=
"server"
TimeZoneOffset
=
"00:00:00"
AdvancedForm-EnableCustomAttributeEditing
=
"true"
SelectedView
=
"MonthView"
OverflowBehavior
=
"Expand"
StartInsertingInAdvancedForm
=
"true"
EnableViewState
=
"true"
DataKeyField
=
"AppointmentID"
DataStartField
=
"CalendarStartDateTime"
DataEndField
=
"CalendarEndDateTime"
DataSubjectField
=
"AppointmentBody"
DataRecurrenceField
=
"RecurrenceRule"
DataRecurrenceParentKeyField
=
"ParentAppointmentID"
DataReminderField
=
"Reminder"
OnAppointmentCreated
=
"RadScheduler1_AppointmentCreated"
OnAppointmentInsert
=
"RadScheduler1_AppointmentInsert"
OnAppointmentUpdate
=
"RadScheduler1_AppointmentUpdate"
OnAppointmentDelete
=
"RadScheduler1_AppointmentDelete"
OnRecurrenceExceptionCreated
=
"RadScheduler1_RecurrenceExceptionCreated"
OnReminderDismiss
=
"RadScheduler1_ReminderDismiss"
OnReminderSnooze
=
"RadScheduler1_ReminderSnooze"
>
<
AdvancedForm
Modal
=
"true"
></
AdvancedForm
>
<
Reminders
Enabled
=
"true"
MaxAge
=
"5"
></
Reminders
>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
></
TimeSlotContextMenuSettings
>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
></
AppointmentContextMenuSettings
>
</
telerik:RadScheduler
>
</
asp:Content
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
BindAppointments();
}
}
private
void
BindAppointments()
{
try
{
List<AppointmentEN> lstAppointment = AppointmentProvider.GetAppointments();
foreach
(var item
in
lstAppointment)
{
item.RecurrenceRule =
string
.IsNullOrWhiteSpace(item.RecurrenceRule) ?
null
: item.RecurrenceRule;
item.ParentAppointmentID = item.ParentAppointmentID == 0 ?
null
: item.ParentAppointmentID;
}
RadScheduler1.DataSource = lstAppointment;
RadScheduler1.DataBind();
RadScheduler1.SelectedView = SchedulerViewType.MonthView;
RadScheduler1.SelectedDate = DateTime.Now;
//RadScheduler1.Visible = true;
}
catch
(Exception ex)
{
}
}
<telerik:RadGrid ID="rgCompanies" runat="server"
<
telerik:RadGrid
ID
=
"rgProducts"
runat
=
"server"
AllowPaging
=
"True"
AllowAutomaticUpdates
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticDeletes
=
"True"
AllowSorting
=
"true"
DataSourceID
=
"Products"
>
<
MasterTableView
AutoGenerateColumns
=
"False"
DataKeyNames
=
"ProductId"
CommandItemDisplay
=
"Top"
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
ShowSortIcon
=
"false"
>
<
HeaderStyle
ForeColor
=
"DimGray"
Width
=
"20px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Dieses Produkt wirklich löschen?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Löschen"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
/>
<
telerik:GridBoundColumn
DataField
=
"ProductId"
HeaderText
=
"Nr."
SortExpression
=
"ProductId"
UniqueName
=
"ProductId"
Visible
=
"true"
ReadOnly
=
"true"
MaxLength
=
"5"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Grammage"
HeaderText
=
"Grammatur"
SortExpression
=
"Grammage"
UniqueName
=
"Grammage1"
Visible
=
"true"
ReadOnly
=
"false"
DataFormatString
=
"{0} g/m²"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Width"
HeaderText
=
"Breite"
SortExpression
=
"Width"
UniqueName
=
"Width"
Visible
=
"true"
ReadOnly
=
"false"
DataFormatString
=
"{0} cm"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Height"
HeaderText
=
"Höhe"
SortExpression
=
".Height"
UniqueName
=
"Height"
Visible
=
"true"
ReadOnly
=
"true"
DataFormatString
=
"{0} cm"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"NumberOfPages"
HeaderText
=
"Umfang"
SortExpression
=
"NumberOfPages"
UniqueName
=
"NumberOfPages"
Visible
=
"true"
ReadOnly
=
"true"
DataFormatString
=
"{0} Seiten"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PrintType1.PrintTypeName"
HeaderText
=
"Drucktyp"
SortExpression
=
"PrintType1.PrintTypeName"
UniqueName
=
"PrintType1.PrintTypeName"
Visible
=
"true"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Refinement1.RefinementName"
HeaderText
=
"Veredelung"
SortExpression
=
"Refinement1.RefinementName"
UniqueName
=
"Refinement1.RefinementName"
Visible
=
"true"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PaperType1.PaperTypeName"
HeaderText
=
"Papersorte"
SortExpression
=
"PaperType1.PaperTypeName"
UniqueName
=
"PaperType1.PaperTypeName"
Visible
=
"true"
ReadOnly
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
EditFormType
=
"Template"
>
<
FormTemplate
>
<
asp:TextBox
ID
=
"tbGrammage"
runat
=
"server"
Text='<%# Bind("Grammage") %>'>
</
asp:TextBox
>
<
asp:TextBox
ID
=
"tbWidth"
runat
=
"server"
Text='<%# Bind("Width") %>'>
</
asp:TextBox
>
<
asp:TextBox
ID
=
"tbHeight"
runat
=
"server"
Text='<%# Bind("Height") %>'>
</
asp:TextBox
>
<
asp:TextBox
ID
=
"tbNumberOfPages"
runat
=
"server"
Text='<%# Bind("NumberOfPages") %>'>
</
asp:TextBox
>
<
asp:DropDownList
ID
=
"ddlPrintType"
runat
=
"server"
SelectedValue='<%# Bind("PrintType") %>' AppendDataBoundItems="true"
DataSourceID="PrintTypes" DataValueField="PrintTypeId" DataTextField="PrintTypeName">
</
asp:DropDownList
>
<
asp:DropDownList
ID
=
"ddlPaperType"
runat
=
"server"
SelectedValue='<%# Bind("PaperType") %>' AppendDataBoundItems="true"
DataSourceID="PaperTypes" DataValueField="PaperTypeId" DataTextField="PaperTypeName">
</
asp:DropDownList
>
<
asp:DropDownList
ID
=
"ddlRefinement"
runat
=
"server"
SelectedValue='<%# Bind("Refinement") %>' AppendDataBoundItems="true"
DataSourceID="Refinements" DataValueField="RefinementId" DataTextField="RefinementName">
</
asp:DropDownList
>
<
asp:Button
ID
=
"btnUpdate"
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></
asp:Button
>
<
asp:Button
ID
=
"btnCancel"
Text
=
"Cancel"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Cancel"
></
asp:Button
>
</
FormTemplate
>
</
EditFormSettings
>
</
MasterTableView
>
<
ClientSettings
AllowKeyboardNavigation
=
"true"
EnablePostBackOnRowClick
=
"true"
>
<
Selecting
AllowRowSelect
=
"true"
></
Selecting
>
</
ClientSettings
>
</
telerik:RadGrid
>
<
asp:EntityDataSource
ID
=
"Companies"
runat
=
"server"
ConnectionString
=
"name=PortalEntities"
DefaultContainerName
=
"PortalEntities"
EnableFlattening
=
"False"
EntitySetName
=
"Companies"
EntityTypeFilter
=
"Company"
EnableInsert
=
"False"
EnableDelete
=
"False"
EnableUpdate
=
"False"
>
</
asp:EntityDataSource
>
<
asp:EntityDataSource
ID
=
"Refinements"
runat
=
"server"
ConnectionString
=
"name=PortalEntities"
DefaultContainerName
=
"PortalEntities"
EnableFlattening
=
"False"
EntitySetName
=
"Refinements"
EntityTypeFilter
=
"Refinement"
EnableInsert
=
"False"
EnableDelete
=
"False"
EnableUpdate
=
"False"
>
</
asp:EntityDataSource
>
<
asp:EntityDataSource
ID
=
"PaperTypes"
runat
=
"server"
ConnectionString
=
"name=PortalEntities"
DefaultContainerName
=
"PortalEntities"
EnableFlattening
=
"False"
EntitySetName
=
"PaperTypes"
EntityTypeFilter
=
"PaperType"
EnableInsert
=
"False"
EnableDelete
=
"False"
EnableUpdate
=
"False"
>
</
asp:EntityDataSource
>
<
asp:EntityDataSource
ID
=
"PrintTypes"
runat
=
"server"
ConnectionString
=
"name=PortalEntities"
DefaultContainerName
=
"PortalEntities"
EnableFlattening
=
"False"
EntitySetName
=
"PrintTypes"
EntityTypeFilter
=
"PrintType"
EnableInsert
=
"False"
EnableDelete
=
"False"
EnableUpdate
=
"False"
>
</
asp:EntityDataSource
>
<
asp:EntityDataSource
ID
=
"Products"
runat
=
"server"
ConnectionString
=
"name=PortalEntities"
DefaultContainerName
=
"PortalEntities"
EnableFlattening
=
"false"
EntitySetName
=
"Products"
EntityTypeFilter
=
"Product"
EnableInsert
=
"true"
EnableDelete
=
"true"
EnableUpdate
=
"true"
Where
=
"it.CompanyId = @CompanyId"
Include
=
"PrintType1, Refinement1, PaperType1"
>
<
WhereParameters
>
<
asp:ControlParameter
ControlID
=
"rgCompanies"
DefaultValue
=
"1"
Name
=
"CompanyId"
PropertyName
=
"SelectedValue"
Type
=
"int64"
/>
</
WhereParameters
>
</
asp:EntityDataSource
>