or
<
telerik:TelerikSPRadSchedulerWebPart
runat
=
"server"
__MarkupType
=
"xmlmarkup"
WebPart
=
"true"
__WebPartId
=
"{AC47AB64-8B3A-4E9D-802F-F0A958B948DD}"
>
<
WebPart
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd
=
"http://www.w3.org/2001/XMLSchema"
xmlns
=
"http://schemas.microsoft.com/WebPart/v2"
>
<
Title
>Telerik SPRadSchedulerWebPart Web Part</
Title
>
<
FrameType
>Default</
FrameType
>
<
Description
>Telerik SPRadSchedulerWebPart Web Part</
Description
>
<
IsIncluded
>true</
IsIncluded
>
<
ZoneID
>FullPage</
ZoneID
>
<
PartOrder
>2</
PartOrder
><
FrameState
>Normal</
FrameState
><
Height
/><
Width
/>
<
AllowRemove
>true</
AllowRemove
>
<
AllowZoneChange
>true</
AllowZoneChange
>
<
AllowMinimize
>true</
AllowMinimize
>
<
AllowConnect
>true</
AllowConnect
>
<
AllowEdit
>true</
AllowEdit
>
<
AllowHide
>true</
AllowHide
>
<
IsVisible
>true</
IsVisible
><
DetailLink
/>
<
HelpLink
/><
HelpMode
>Modeless</
HelpMode
>
<
Dir
>Default</
Dir
><
PartImageSmall
/>
<
MissingAssembly
>Cannot import this Web Part.</
MissingAssembly
>
<
PartImageLarge
/><
IsIncludedFilter
/>
<
ExportControlledProperties
>true</
ExportControlledProperties
>
<
ConnectionID
>00000000-0000-0000-0000-000000000000</
ConnectionID
>
<
ID
>g_ac47ab64_8b3a_4e9d_802f_f0a958b948dd</
ID
>
<
BindingMode
xmlns
=
"Telerik.Ajax.SharePoint.SPRadSchedulerWebPart"
>SPList</
BindingMode
>
<
DayStartTime
xmlns
=
"Telerik.Ajax.SharePoint.SPRadSchedulerWebPart"
/>
<
DayEndTime
xmlns
=
"Telerik.Ajax.SharePoint.SPRadSchedulerWebPart"
/>
<
WorkDayStartTime
xmlns
=
"Telerik.Ajax.SharePoint.SPRadSchedulerWebPart"
/>
<
WorkDayEndTime
xmlns
=
"Telerik.Ajax.SharePoint.SPRadSchedulerWebPart"
/>
</
WebPart
>
</
telerik:TelerikSPRadSchedulerWebPart
>
THIS IS THE DEFAULT TEMPLATE
" at the top of my list and then the real list items display below that.<
telerik:RadListView
ID
=
"rlvJobsListPage"
runat
=
"server"
ItemPlaceholderID
=
"phJobsList"
DataSourceId
=
"objJobList"
OnItemDataBound
=
"rlvJobsListPage_ItemDataBound"
AllowCustomPaging
=
"true"
AllowPaging
=
"true"
PageSize
=
"20"
AllowSorting
=
"True"
>
<
LayoutTemplate
>
<
div
id
=
"searchList"
>
<
div
id
=
"phJobsList"
runat
=
"server"
>
</
div
>
</
div
>
</
LayoutTemplate
>
<
EmptyDataTemplate
>
No records found
</
EmptyDataTemplate
>
<
ItemTemplate
>
THIS IS THE DEFAULT TEMPLATE<
br
/>
</
ItemTemplate
>
</
telerik:RadListView
>
protected
void
rlvJobsListPage_ItemDataBound(
object
sender, Telerik.Web.UI.RadListViewItemEventArgs e)
{
// Set each bound item to status "Loaded"
if
(e.Item
is
RadListViewDataItem)
{
RadListViewDataItem thisDataItem = (RadListViewDataItem)e.Item;
Job thisListing = (Job)thisDataItem.DataItem;
//Determine which template to get from cache
Templating listingTemplate = Templating.GetTemplateForListing(thisListing.ListingTemplate);
rlvJobsListPage.ItemTemplate = Templating.Render_ITemplate(listingTemplate.TemplatePath, TemplateType.Summary,
this
);
e.Item.DataBind();
}
}
//Indices
int
i_incrementA = 0,
i_incrementB = 0;
// Return the number of molds we are working for with the samples
int
i_gridLines = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_MOULE.Count();
// Return the number of controls we are working on.
int
i_gridColumns = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_RESULTAT.Count();
long
i_currentResult = 0;
long
i_currentMold = 0;
GridColumnGroup GCG_headerGroup =
new
GridColumnGroup();
GridBoundColumn GCO_columns =
new
GridBoundColumn();
// Add the first column wich will content mold numbers.
// First header row : Controls
GCG_headerGroup.Name =
"control0"
;
GCG_headerGroup.HeaderText =
""
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
//Second header row : Buttons
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"buttons0"
;
GCG_headerGroup.HeaderText =
""
;
GCG_headerGroup.ParentGroupName =
"control0"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Third header row : Max
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"max0"
;
GCG_headerGroup.HeaderText =
"Max :"
;
GCG_headerGroup.ParentGroupName =
"buttons0"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Fourth header row : MaxWarn
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"maxWarn0"
;
GCG_headerGroup.HeaderText =
"Warn :"
;
GCG_headerGroup.ParentGroupName =
"max0"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Fifth header row : Target
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"target0"
;
GCG_headerGroup.HeaderText =
"Target :"
;
GCG_headerGroup.ParentGroupName =
"maxWarn0"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Sixth header row : MinWarn
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"minWarn0"
;
GCG_headerGroup.HeaderText =
"Warn :"
;
GCG_headerGroup.ParentGroupName =
"target0"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Seventh header row : Min
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"min0"
;
GCG_headerGroup.HeaderText =
"Min :"
;
GCG_headerGroup.ParentGroupName =
"minWarn0"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
for
(i_incrementB = 0; i_incrementB < i_gridColumns; i_incrementB++)
{
i_currentResult = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_RESULTAT[i_incrementB].RECLEUNIK;
i_currentMold = l_resMou[0].OBJ_RESULTAT.OBJ_PRELEV.LST_MOULE[i_incrementB].MOCLEUNIK;
// Create a headerGroup for the control name.
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"control"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText = l_resMou.Where(r => r.OBJ_RESULTAT.RECLEUNIK == i_currentResult & r.OBJ_MOULE.MOCLEUNIK == i_currentMold).Single<EntityRESMOU>().OBJ_RESULTAT.OBJ_TOLERANCES.OBJ_CONTROLE.OBJ_TYPECTRL.NOMTYPE;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// buttons header groups
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"buttons"
+ (i_incrementB + 1);
GCG_headerGroup.ParentGroupName =
"control"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText =
"buttons"
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Tolerances Max
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"max"
+ (i_incrementB + 1);
GCG_headerGroup.ParentGroupName =
"buttons"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText =
""
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Tolerances MaxWarn
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"maxWarn"
+ (i_incrementB + 1);
GCG_headerGroup.ParentGroupName =
"max"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText =
""
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Tolerances Target
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"target"
+ (i_incrementB + 1);
GCG_headerGroup.ParentGroupName =
"maxWarn"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText =
""
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Tolerances MinWarn
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"minWarn"
+ (i_incrementB + 1);
GCG_headerGroup.ParentGroupName =
"target"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText =
""
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
// Tolerances Target
GCG_headerGroup =
new
GridColumnGroup();
GCG_headerGroup.Name =
"min"
+ (i_incrementB + 1);
GCG_headerGroup.ParentGroupName =
"minWarn"
+ (i_incrementB + 1);
GCG_headerGroup.HeaderText =
""
;
GRD_CONTROLLIST.MasterTableView.ColumnGroups.Add(GCG_headerGroup);
}
// Data fields
// WARNING : Be careful of the column name which must be the same as the datasource column name.
for
(i_incrementB=0;i_incrementB<i_gridColumns+1;i_incrementB++)
{
GCO_columns =
new
GridBoundColumn();
GCO_columns.ColumnGroupName =
"min"
+ i_incrementB;
GCO_columns.UniqueName =
"col"
+ i_incrementB;
GCO_columns.DataField =
"col"
+ i_incrementB;
GCO_columns.HeaderText =
"col"
+ i_incrementB;
GRD_CONTROLLIST.MasterTableView.Columns.Add(GCO_columns);
}
}
DataTable TBL_setOutResults =
new
DataTable();
for
(
int
i = 0; i < 9; i++)
{
TBL_setOutResults.Columns.Add(
"col"
+i);
}
TBL_setOutResults.Rows.Add(
"#6"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#12"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#16"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#17"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#20"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#24"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#32"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#33"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#34"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#36"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#41"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#47"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#52"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
TBL_setOutResults.Rows.Add(
"#55"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
,
"10"
);
GRD_CONTROLLIST.DataSource = TBL_setOutResults;
GRD_CONTROLLIST.DataBind();
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"content2"
Runat
=
"Server"
>
<
script
type
=
"text/javascript"
>
//
<![CDATA[
function validationFailed(sender, eventArgs) {
$(".ErrorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
}
//]]>
</
script
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
>
</
telerik:RadStyleSheetManager
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
>
</
asp:ScriptReference
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
>
</
asp:ScriptReference
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQueryInclude.js"
>
</
asp:ScriptReference
>
</
Scripts
>
</
telerik:RadScriptManager
>
<
telerik:RadButton
ID
=
"uploadbtn"
runat
=
"server"
Text
=
"upload"
onclick
=
"uploadbtn_Click"
>
</
telerik:RadButton
>
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
AllowedFileExtensions
=
"jpg,jpeg"
TargetFolder
=
"~/upload"
OnClientValidationFailed
=
"validationFailed"
onfileuploaded
=
"RadAsyncUpload1_FileUploaded"
>
<
FileFilters
>
<
telerik:FileFilter
Description
=
"Images(jpeg;jpg)"
Extensions
=
"jpeg,jpg"
/>
</
FileFilters
>
</
telerik:RadAsyncUpload
>
protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
{
Label fileName = new Label();
fileName.Text = e.File.FileName;
if (e.IsValid)
{
Response.Write(fileName + "::true");
}
else
{
Response.Write("false");
}
}
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
Width
=
"100%"
Height
=
"100%"
OnDataBound
=
"RadScheduler1_DataBound"
AppointmentStyleMode
=
"Default"
OnAppointmentDataBound
=
"RadScheduler1_AppointmentDataBound"
OnNavigationComplete
=
"RadScheduler1_OnNavigationComplete"
OnClientFormCreated
=
"schedulerFormCreated"
CustomAttributeNames
=
"AppointmentColor"
StartInsertingInAdvancedForm
=
"true"
EnableDescriptionField
=
"true"
DayView-EnableExactTimeRendering
=
"True"
ShowFooter
=
"False"
GroupBy
=
"Room"
DayEndTime
=
"21:00:00"
WorkDayEndTime
=
"21:00:00"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Sunday"
Culture
=
"en-GB"
DayView-HeaderDateFormat
=
"dddd, MMMM dd, yyyy"
>
<
AdvancedForm
Modal
=
"true"
/>
<
Reminders
Enabled
=
"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") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>'
RoomID='<%# Bind("Room") %>' />
</
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") %>' Reminder='<%# Bind("Reminder") %>'
AppointmentColor='<%# Bind("AppointmentColor") %>' UserID='<%# Bind("User") %>'
RoomID='<%# Bind("Room") %>' />
</
AdvancedInsertTemplate
>
<
TimelineView
UserSelectable
=
"false"
/>
<
TimeSlotContextMenuSettings
EnableDefault
=
"true"
/>
<
DayView
EnableExactTimeRendering
=
"True"
></
DayView
>
<
AppointmentContextMenuSettings
EnableDefault
=
"true"
/>
</
telerik:RadScheduler
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
EnableEmbeddedSkins
=
"False"
Skin
=
"MyOwn"
EnableTextHTMLEncoding
=
"True"
>
<
Items
>
<
telerik:RadMenuItem
runat
=
"server"
HoveredImageUrl
=
"~/gfx/home_hover.png"
ImageUrl
=
"~/gfx/home.png"
NavigateUrl
=
"~/About.aspx"
SelectedImageUrl
=
"~/gfx/home_hover.png"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenu
>