Hi,
Originally Posted by
egvt
how could call directly to the event detail window in calendarpanel
I can suggest the following solution.
Example
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET Example</title>
<script type="text/javascript">
var CompanyX = {
getCalendar : function () {
return CompanyX.CalendarPanel1;
},
getWindow : function () {
return CompanyX.EventEditWindow1;
},
dayClick : function(cal, dt, allDay, el) {
this.record.show.call(this, cal, {
StartDate: dt,
IsAllDay: allDay
}, el);
},
record : {
show: function(cal, rec, el) {
var win = CompanyX.getWindow();
win.on("beforeshow", function () { return false; }, win, { single : true });
win.show(rec, el);
CompanyX.getCalendar().showEditForm(CompanyX.getWindow().activeRecord);
}
}
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" Namespace="CompanyX" />
<ext:Viewport runat="server" Layout="FitLayout">
<Items>
<ext:CalendarPanel ID="CalendarPanel1" runat="server" Height="500">
<EventStore runat="server">
<Events>
<ext:Event
Title="My event"
StartDate="2012/05/14"
EndDate="2012/05/15"
CalendarId="1" />
</Events>
</EventStore>
<GroupStore ID="GroupStore1" runat="server">
<Groups>
<ext:Group CalendarId="1" Title="Home" />
<ext:Group CalendarId="2" Title="Work" />
</Groups>
</GroupStore>
<Listeners>
<DayClick Fn="CompanyX.dayClick" Scope="CompanyX" />
<EventClick Fn="CompanyX.record.show" Scope="CompanyX" />
</Listeners>
</ext:CalendarPanel>
</Items>
</ext:Viewport>
<ext:EventEditWindow ID="EventEditWindow1" runat="server" Hidden="true" />
</form>
</body>
</html>
Originally Posted by
egvt
or at least as add a field (eg notes) to editeventwindow?
Please follow:
http://forums.ext.net/showthread.php?17056
Originally Posted by
egvt
and not show the "edit details" link.
You can hide it this way.
<ext:EventEditWindow
ID="EventEditWindow1"
runat="server"
GroupStoreID="GroupStore1"
Hidden="true">
<Listeners>
<BeforeRender Handler="this.fbar.items.get(0).hide();" />
</Listeners>
</ext:EventEditWindow>