PDA

View Full Version : [CLOSED] CalendarPanel Razor MVC3



T3rryChan
Apr 30, 2012, 3:11 PM
Hi,

I tried to initialized a CalendarPanel like this



@Html.X().CalendarPanel();


But the CalendarPanel is not defined. Could someone please look into this? Thanks.

Daniil
Apr 30, 2012, 5:37 PM
Hi,

Thanks for the report. We have added it in SVN, revision #3974.

T3rryChan
May 01, 2012, 4:52 AM
I am still not able to set the "Calendars" of a CalendarStore. Could you look into this? Thanks.

Daniil
May 01, 2012, 9:44 AM
Thanks for the report. Fixed in SVN, revision #3975.

Here is the example.

Example

<!DOCTYPE html>
<html>
<head>
<title>Ext.NET Razor Example</title>
</head>
<body>
@Html.X().ResourceManager()

@(Html.X().CalendarPanel()
.Width(800)
.Height(800)
.EventStore(Html.X().EventStore()
.Events(events =>
{
events.Add(new EventModel()
{
EventId = 1,
Title = "Test Event 1",
StartDate = DateTime.Now,
EndDate = DateTime.Now.AddDays(1),
CalendarId = 1
});

events.Add(new EventModel()
{
EventId = 2,
Title = "Test Event 2",
StartDate = DateTime.Now.AddDays(4),
EndDate = DateTime.Now.AddDays(5),
CalendarId = 2
});

})
)
.CalendarStore(Html.X().CalendarStore()
.Calendars(c =>
{
c.Add(new CalendarModel()
{
CalendarId = 1,
Title = "Calendar 1"
});

c.Add(new CalendarModel()
{
CalendarId = 2,
Title = "Calendar 2"
});
})
)
)
</body>
</html>

T3rryChan
May 02, 2012, 6:26 AM
Thank you so much. The example provide is working great, but MonthView of CalendarPanel, NoMapping of EventStore, and Mappings of EventStore are still undefined in Razor ViewEngine. Please look into it.

Daniil
May 02, 2012, 11:43 AM
Thanks again for the report, fixed in revision #3978.

There might be some missed properties more, please report if you will find any.