or
IEnumerable<Invoice> invs = Invoice.GetTestInvoices(100);
var s = from i
in
invs
group i by i.Name;
ChartSeries chtOutstanding =
new
ChartSeries(
"Outstanding"
, ChartSeriesType.StackedBar);
ChartSeries chtCompleted =
new
ChartSeries(
"Completed"
, ChartSeriesType.StackedBar);
chtOutstanding.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside;
chtCompleted.Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside;
foreach
(var item
in
s.OrderBy(a => a.Key))
{
chtCompleted.AddItem(item.Where(a => a.Status == 1).Count());
chtOutstanding.AddItem(item.Where(a => a.Status != 1).Count());
}
RadChart1.Series.Add(chtOutstanding);
RadChart1.Series.Add(chtCompleted);
<
telerik:GridAttachmentColumn
AttachmentDataField
=
"Attachment"
AttachmentKeyFields
=
"ItemID,ForeignKeyID,AttachmentID"
DataSourceID
=
"ItemAttachmentEntityDataSource"
DataTextField
=
"DataText"
FileName
=
"attachment"
FileNameTextField
=
"FileName"
FilterControlAltText
=
"Filter column column"
HeaderText
=
"Attachment"
UniqueName
=
"Attachment"
>
</
telerik:GridAttachmentColumn
>
<
div
>
<
asp:UpdatePanel
ID
=
"upCalendar"
runat
=
"server"
UpdateMode
=
"Always"
>
<
ContentTemplate
>
<
telerik:RadCalendar
ID
=
"rCal"
runat
=
"server"
AutoPostBack
=
"true"
EnableMultiSelect
=
"false"
FastNavigationStep
=
"3"
EnableEmbeddedSkins
=
"true"
EnableEmbeddedBaseStylesheet
=
"true"
EnableMonthYearFastNavigation
=
"true"
DayNameFormat
=
"Short"
ShowRowHeaders
=
"true"
ShowOtherMonthsDays
=
"false"
Skin
=
"Default"
Width
=
"298px"
OnSelectionChanged
=
"rCal_SelectionChanged"
EnableViewState
=
"true"
>
<
TitleStyle
CssClass
=
"CalendarTitleStyle"
/><
SelectedDayStyle
CssClass
=
"CalendarDaySelectedClass"
/><
DayOverStyle
CssClass
=
"CalendarDayOverClass"
/>
</
telerik:RadCalendar
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
div
>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
rCal.RegisterWithScriptManager = false;
rCal.RangeMinDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
if (SelectedDateForSearch.HasValue)
{
rCal.SelectedDate = SelectedDateForSearch.Value;
rCal.FocusedDate = SelectedDateForSearch.Value;
}
}
}
protected void rCal_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)
{
if (e.SelectedDates.Count > 0)
{
DateTime selectedDate = rCal.SelectedDate.Date;
string url = "To any page"
Response.Redirect(url);
}
}
protected void fileUploaded(object sender, FileUploadedEventArgs e)
{
if (RadAsyncUpload1.UploadedFiles.Count > 0)
{
}
}
<table cellspacing="0" summary="title and navigation" border="0">
<table summary="combobox" style="border-width:0;border-collapse:collapse;">
<
telerik:RadScheduler
Visible
=
"true"
runat
=
"server"
ID
=
"UserSchedulerOrderEntry"
TimelineView-UserSelectable
=
"false"
MonthView-UserSelectable
=
"True"
SelectedView
=
"WeekView"
Height
=
"550"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Sunday"
StartEditingInAdvancedForm
=
"true"
AllowDelete
=
"true"
AllowEdit
=
"false"
AllowInsert
=
"false"
OnClientAppointmentsPopulating
=
"OnClientAppointmentsPopulating"
OnClientAppointmentEditing
=
"OnClientAppointmentEditing"
OnClientAppointmentsPopulated
=
"OnClientAppointmentsPopulated"
OnClientAppointmentCreated
=
"appointmentCreated"
OnClientRequestFailed
=
"clientRequestFailed"
OnClientRequestSuccess
=
"clientRequestSuccess"
OnClientAppointmentDataBound
=
"OnClientAppointmentDataBound"
OnClientAppointmentMoveStart
=
"OnClientAppointmentMoveStart"
OnClientAppointmentContextMenuItemClicking
=
"User_appointmentContextMenuItemClicking"
OnClientAppointmentContextMenuItemClicked
=
"User_appointmentContextMenuItemClicked"
OnClientAppointmentContextMenu
=
"User_appointmentContextMenu"
OnClientNavigationCommand
=
"User_navigationCommand"
OnClientNavigationComplete
=
"User_navigationComplete"
RowHeight
=
"20px"
MonthView-AdaptiveRowHeight
=
"false"
MonthView-VisibleAppointmentsPerDay
=
"1"
MonthView-HeaderDateFormat
=
"MMMM yyyy"
MonthView-FirstDayHeaderDateFormat
=
"dd-MMMM"
MonthView-DayHeaderDateFormat
=
"dd"
HoursPanelTimeFormat
=
"H:mm"
DayStartTime
=
"06:00"
DayEndTime
=
"20:00"
WorkDayStartTime
=
"06:00"
WorkDayEndTime
=
"20:00"
AppointmentStyleMode
=
"Default"
EnableDescriptionField
=
"false"
OverflowBehavior
=
"Expand"
ShowAllDayRow
=
"False"
CustomAttributeNames
=
"RequestItemNote"
>
<
AppointmentContextMenus
>
<
telerik:RadSchedulerContextMenu
runat
=
"server"
ID
=
"UserSchedulerOrderEntrytMenu"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Edit"
Value
=
"CommandEdit"
/>
<
telerik:RadMenuItem
Text
=
"EditAdvance"
Value
=
"CommandEdit2"
/>
<
telerik:RadMenuItem
Text
=
"EditAdvance2"
Value
=
"CommandEdit3"
/>
</
Items
>
</
telerik:RadSchedulerContextMenu
>
</
AppointmentContextMenus
>
<
WebServiceSettings
Path
=
"~/WebServices/OrderEntry/UserAppointmentCalendar.asmx"
ResourcePopulationMode
=
"ServerSide"
/>
<
ResourceStyles
>
<
telerik:ResourceStyleMapping
Type
=
"Status"
Key
=
"Required"
BackColor
=
"#FAE68B"
BorderColor
=
"#FCD836"
/>
<
telerik:ResourceStyleMapping
Type
=
"Status"
Key
=
"Scheduled"
BackColor
=
"#C4E8FF"
BorderColor
=
"#30A9FB"
/>
<
telerik:ResourceStyleMapping
Type
=
"Status"
Key
=
"Executed"
BackColor
=
"#B3E7A8"
BorderColor
=
"#71D05E"
/>
<
telerik:ResourceStyleMapping
Type
=
"Status"
Key
=
"Deleted"
BackColor
=
"#FF8888"
BorderColor
=
"#E51010"
/>
</
ResourceStyles
>
</
telerik:RadScheduler
>