PDA

View Full Version : [CLOSED] Calendarpanel + objectgadatsource



bossun
Aug 07, 2012, 10:58 PM

Daniil
Aug 08, 2012, 7:07 AM
Hi,

Please set up

NoMappings="true"
for the EventStore.

Example Page

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.Net Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<asp:ObjectDataSource
ID="ObjectDataSource1"
runat="server"
SelectMethod="GetAll"
TypeName="Test" />

<ext:Viewport runat="server" Layout="FitLayout">
<Items>
<ext:CalendarPanel runat="server">
<EventStore
runat="server"
DataSourceID="ObjectDataSource1"
NoMappings="true" />
</ext:CalendarPanel>
</Items>
</ext:Viewport>
</body>
</html>

Example Test Class

using System;
using Ext.Net;
using System.Collections.Generic;

public class Test
{
public static List<EventModel> GetAll()
{
return new List<EventModel>
{
new EventModel()
{
EventId = 1,
Title = "My event",
StartDate = DateTime.Now,
EndDate = DateTime.Now.AddDays(1),
CalendarId = 1
}
};
}
}

bossun
Aug 08, 2012, 12:54 PM
Great it works well but I have two other issues.

The fist one is when I create a new Event, the "IsNew" property is not set to true.

When I edit or add a new event, my calendar is not reloaded. I need to reload the whole page to see my changes. EventStore.DataBind() worked well in 1.x but in 2.0 it doesn't do what I want.

I manipulate my events in serverside using directevents as you can see in the first topic..

Daniil
Aug 08, 2012, 2:40 PM
These issues looks to be not tightly related to the current topic.

Please start new forum threads for each one providing more details (best - samples to reproduce).