Ok I tried evrything and I got tons of errors and no good results =/
But here is all the code I wrote..
EventModuleExt.ascx
MarkUp
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EventModuleExt.ascx.cs" Inherits="TheScene.Web.TheScene.WebParts.EventModuleExt.EventModuleExt" %>
<%@ Register TagPrefix="MyControls" TagName="EventSimpleViewExt" Src="/TheScene/WebParts/EventModuleExt/EventSimpleViewExt.ascx" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="MonoX" TagName="StyledButton" Src="/MonoX/controls/StyledButton.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="EventEditor" Src="/MonoX/ModuleGallery/EventModule/EventEditor.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="SimpleEventView" Src="/MonoX/ModuleGallery/EventModule/EventSimpleView.ascx" %>
<
asp:PlaceHolder
ID
=
"plhNoCalendar"
runat
=
"server"
Visible
=
"false"
>
<%= MonoSoftware.MonoX.Resources.EventModuleResources.NoCalendarSelected %>
</
asp:PlaceHolder
>
<
asp:UpdatePanel
ID
=
"upEventModule"
runat
=
"server"
ChildrenAsTriggers
=
"true"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
asp:PlaceHolder
ID
=
"plhEventEditor"
runat
=
"server"
Visible
=
"false"
>
<
MonoX:EventEditor
ID
=
"ctlEventEditor"
runat
=
"server"
></
MonoX:EventEditor
>
</
asp:PlaceHolder
>
<
asp:PlaceHolder
ID
=
"plhSchedule"
runat
=
"server"
>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
width
=
"100%"
class
=
"event-module"
>
<
tr
>
<
td
class
=
"calendar"
>
<
asp:PlaceHolder
ID
=
"plhAddNewEvent"
runat
=
"server"
>
<
asp:LinkButton
ID
=
"btnNewEvent"
runat
=
"server"
CssClass
=
"add-new-event"
></
asp:LinkButton
>
</
asp:PlaceHolder
>
<
div
style
=
"clear:both"
>
<
telerik:RadCalendar
ID
=
"calEvent"
runat
=
"server"
Skin
=
"WebBlue"
>
</
telerik:RadCalendar
>
</
div
>
</
td
>
<
td
class
=
"scheduler"
>
<
div
>
<
telerik:RadScheduler
ID
=
"schEvent"
runat
=
"server"
Height
=
"100%"
DataKeyField
=
"Id"
DataStartField
=
"StartTime"
DataEndField
=
"EndTime"
DataSubjectField
=
"Title"
DataDescriptionField
=
"Description"
Skin
=
"Vista"
CssClass
=
"event-scheduler"
SelectedView
=
"WeekView"
>
</
telerik:RadScheduler
>
</
div
>
</
td
>
</
tr
>
</
table
>
<
telerik:RadToolTip
ID
=
"rttEventDetails"
runat
=
"server"
IgnoreAltAttribute
=
"true"
ShowEvent
=
"FromCode"
HideEvent
=
"ManualClose"
Position
=
"BottomCenter"
RelativeTo
=
"Element"
Width
=
"300px"
>
</
telerik:RadToolTip
>
<
div
style
=
"display:none"
>
<
asp:HiddenField
ID
=
"fldRefreshParams"
runat
=
"server"
/>
<
asp:Button
ID
=
"btnRefresh"
runat
=
"server"
/>
</
div
>
</
asp:PlaceHolder
>
<
asp:PlaceHolder
ID
=
"plhSimpleView"
runat
=
"server"
>
<
div
class
=
"event-simple-view"
>
<
MonoX:StyledButton
ID
=
"btnNewSimpleMode"
runat
=
"server"
/>
<
MonoX:SimpleEventView
ID
=
"ctlSimpleView"
runat
=
"server"
></
MonoX:SimpleEventView
>
</
div
>
</
asp:PlaceHolder
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
Code Behind:
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
MonoSoftware.MonoX.Utilities;
using
MonoSoftware.MonoX.ModuleGallery;
namespace
TheScene.Web.TheScene.WebParts.EventModuleExt
{
public
partial
class
EventModuleExt : MonoSoftware.MonoX.ModuleGallery.EventSimpleView
{
private
DateTime _selectedDay = DateTime.Now;
/// <summary>
/// Gets or sets selected day so you can easily change day you want to show
/// </summary>
public
DateTime SelectedDay
{
get
{
return
_selectedDay; }
set
{
_selectedDay = value;
}
}
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
// We can switch mode to simple as we're not interested in advanced mode in this case
Mode = MonoSoftware.MonoX.ModuleGallery.EventModuleMode.Simple;
// No point in showing the filter
ctlSimpleView.ShowFilter =
false
;
}
public
override
void
DataBind()
{
// Before we bind data we need to set day we want to show
((EventSimpleViewExt)ctlSimpleView).SelectedDay =
this
.SelectedDay;
base
.DataBind();
}
}
}
EventSimpleViewExt
MarkUp:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EventSimpleViewExt.ascx.cs" Inherits="TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt" %>
<%@ Register Namespace="MonoSoftware.Web.Pager" Assembly="MonoSoftware.Web.Pager" TagPrefix="mono" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="MonoX" TagName="StyledButton" Src="/MonoX/controls/StyledButton.ascx" %>
<
asp:PlaceHolder
ID
=
"plhFilter"
runat
=
"server"
>
<
div
class
=
"top-button-holder"
>
<
div
class
=
"date-picker"
><
telerik:RadDateTimePicker
ID
=
"dateFrom"
runat
=
"server"
></
telerik:RadDateTimePicker
></
div
>
<
div
class
=
"date-picker"
><
telerik:RadDateTimePicker
ID
=
"dateTo"
runat
=
"server"
></
telerik:RadDateTimePicker
></
div
>
<
MonoX:StyledButton
ID
=
"btnFilter"
runat
=
"server"
/>
<
MonoX:StyledButton
ID
=
"btnClearFilter"
runat
=
"server"
/>
</
div
>
</
asp:PlaceHolder
>
<
div
class
=
"list-view"
>
<
asp:ListView
ID
=
"lvItems"
runat
=
"server"
>
<
LayoutTemplate
>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"itemPlaceholder"
></
asp:PlaceHolder
>
</
LayoutTemplate
>
<
ItemTemplate
></
ItemTemplate
>
</
asp:ListView
>
<
mono:Pager
runat
=
"server"
ID
=
"pager"
PageSize
=
"10"
NumericButtonCount
=
"5"
AllowCustomPaging
=
"true"
AutoPaging
=
"false"
>
<
PagerTemplate
></
PagerTemplate
>
</
mono:Pager
>
</
div
>
Code Behind:
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
MonoSoftware.MonoX.Utilities;
using
MonoSoftware.MonoX.ModuleGallery;
namespace
TheScene.Web.TheScene.WebParts.EventModuleExt
{
public
partial
class
EventSimpleViewExt : MonoSoftware.MonoX.ModuleGallery.EventSimpleView
{
public
override
void
DataBind()
{
// Fetch filter, we can ignore module filter in this case as we have full control over fetching
IRelationPredicateBucket filter =
new
RelationPredicateBucket();
filter.PredicateExpression.Add(CalendarEventFields.CalendarId ==
this
.CalendarId);
filter.PredicateExpression.Add(CalendarEventFields.StartTime >=
this
.SelectedDate.Date);
filter.PredicateExpression.Add(CalendarEventFields.StartTime <
this
.SelectedDate.Date.AddDays(1));
// Set sorter, here you'll change sort direction by changing SortOperator
ISortExpression sorter =
new
SortExpression(
new
SortClause(CalendarEventFields.StartTime,
null
, SortOperator.Descending));
EntityCollection<CalendarEventEntity> items =
new
EntityCollection<CalendarEventEntity>();
BaseMonoXRepository.GetInstance().FetchEntityCollection(items, filter, 0, sorter,
null
, pager.CurrentPageIndex + 1, pager.PageSize);
int
recordCount =
this
.GetDbCount(items, filter);
PagerUtility.BindPager(pager, DataBind, lvItems, items, recordCount);
}
}
}
Error List..
Error 13 The type or namespace name 'SortExpression' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 42 Portal
Error 14 The type or namespace name 'SortClause' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 61 Portal
Error 6 The type or namespace name 'RelationPredicateBucket' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 18 51 Portal
Error 12 The type or namespace name 'ISortExpression' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 13 Portal
Error 5 The type or namespace name 'IRelationPredicateBucket' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 18 13 Portal
Error 18 The type or namespace name 'EntityCollection' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 26 13 Portal
Error 20 The type or namespace name 'EntityCollection' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 26 63 Portal
Error 17 The type or namespace name 'CalendarEventEntity' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 26 30 Portal
Error 19 The type or namespace name 'CalendarEventEntity' could not be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 26 80 Portal
Error 16 The name 'SortOperator' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 109 Portal
Error 23 The name 'Mode' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventModuleExt.ascx.cs 34 13 Portal
Error 7 The name 'CalendarEventFields' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 19 44 Portal
Error 8 The name 'CalendarEventFields' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 20 44 Portal
Error 10 The name 'CalendarEventFields' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 21 44 Portal
Error 15 The name 'CalendarEventFields' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 24 72 Portal
Error 21 The name 'BaseMonoXRepository' does not exist in the current context C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 27 13 Portal
Error 24 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'SelectedDay' and no extension method 'SelectedDay' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventModuleExt.ascx.cs 42 49 Portal
Error 9 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'SelectedDate' and no extension method 'SelectedDate' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 20 82 Portal
Error 11 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'SelectedDate' and no extension method 'SelectedDate' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 21 81 Portal
Error 22 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' does not contain a definition for 'GetDbCount' and no extension method 'GetDbCount' accepting a first argument of type 'TheScene.Web.TheScene.WebParts.EventModuleExt.EventSimpleViewExt' could be found (are you missing a using directive or an assembly reference?) C:\#ThePittsburghScene\TheScene\WebParts\EventModuleExt\EventSimpleViewExt.ascx.cs 28 36 Portal