Jan 10, 2011, 12:13 PM
How to dispaly the Data using calendarpanel
<ext:CalendarPanel ID="CalendarPanel1" runat="server" Region="Center" ActiveIndex="2" Border="false">
<GroupStore ID="GroupStore1" runat="server">
<Groups>
<ext:Group CalendarId="1" Title="Office Visit" />
<ext:Group CalendarId="2" Title="General Check-Up" />
<ext:Group CalendarId="3" Title="Consultation" />
<ext:Group CalendarId="4" Title="Routine Visit" />
</Groups>
</GroupStore>
<MonthView ID="MonthView1" runat="server" ShowHeader="true" ShowWeekLinks="true" ShowWeekNumbers="true" />
<Listeners>
<ViewChange Fn="CompanyX.viewChange" Scope="CompanyX" />
<EventClick Fn="CompanyX.record.show" Scope="CompanyX" />
<DayClick Fn="CompanyX.dayClick" Scope="CompanyX" />
<RangeSelect Fn="CompanyX.rangeSelect" Scope="CompanyX" />
<EventMove Fn="CompanyX.record.move" Scope="CompanyX" />
<EventResize Fn="CompanyX.record.resize" Scope="CompanyX" />
</Listeners>
<EventStore ID="EventStore1" runat="server">
</EventStore>
</ext:CalendarPanel>
protected void Page_Load(object sender, EventArgs e)
{
BindData();
}
protected void BindData()
{
ARServiceClient arser = new ARServiceClient();
try
{
EventStore eventStore = (EventStore)this.CalendarPanel1.EventStore;
ARService.CalendarSchedule[] calarr = arser.SelectAllCalendarSchedule();
if (calarr != null)
{
if (calarr.Count() > 0)
{
foreach (ARService.CalendarSchedule showcal in calarr)
{
Event myEvent = new Event();
myEvent.Title = showcal.Title;
myEvent.StartDate = showcal.StartDate;
myEvent.EndDate = showcal.Enddate;
myEvent.CalendarId = showcal.OccuranceID;
eventStore.Events.Add(myEvent);
}
eventStore.DataBind();
}
}
}
catch (Exception ex)
{
WebPageException.HandleException(ex, "CalendarSchedule ShowallData()");
}
finally
{
if (arser.State == System.ServiceModel.CommunicationState.Opened)
{
arser.Close();
}
}
}
All the data is binding properly using of eventstore depending on start date,End date,time duration.But how to get the Calendar data for display purpose on each Control(title,startdate,enddate).
pls help me as soon as possible......
<GroupStore ID="GroupStore1" runat="server">
<Groups>
<ext:Group CalendarId="1" Title="Office Visit" />
<ext:Group CalendarId="2" Title="General Check-Up" />
<ext:Group CalendarId="3" Title="Consultation" />
<ext:Group CalendarId="4" Title="Routine Visit" />
</Groups>
</GroupStore>
<MonthView ID="MonthView1" runat="server" ShowHeader="true" ShowWeekLinks="true" ShowWeekNumbers="true" />
<Listeners>
<ViewChange Fn="CompanyX.viewChange" Scope="CompanyX" />
<EventClick Fn="CompanyX.record.show" Scope="CompanyX" />
<DayClick Fn="CompanyX.dayClick" Scope="CompanyX" />
<RangeSelect Fn="CompanyX.rangeSelect" Scope="CompanyX" />
<EventMove Fn="CompanyX.record.move" Scope="CompanyX" />
<EventResize Fn="CompanyX.record.resize" Scope="CompanyX" />
</Listeners>
<EventStore ID="EventStore1" runat="server">
</EventStore>
</ext:CalendarPanel>
protected void Page_Load(object sender, EventArgs e)
{
BindData();
}
protected void BindData()
{
ARServiceClient arser = new ARServiceClient();
try
{
EventStore eventStore = (EventStore)this.CalendarPanel1.EventStore;
ARService.CalendarSchedule[] calarr = arser.SelectAllCalendarSchedule();
if (calarr != null)
{
if (calarr.Count() > 0)
{
foreach (ARService.CalendarSchedule showcal in calarr)
{
Event myEvent = new Event();
myEvent.Title = showcal.Title;
myEvent.StartDate = showcal.StartDate;
myEvent.EndDate = showcal.Enddate;
myEvent.CalendarId = showcal.OccuranceID;
eventStore.Events.Add(myEvent);
}
eventStore.DataBind();
}
}
}
catch (Exception ex)
{
WebPageException.HandleException(ex, "CalendarSchedule ShowallData()");
}
finally
{
if (arser.State == System.ServiceModel.CommunicationState.Opened)
{
arser.Close();
}
}
}
All the data is binding properly using of eventstore depending on start date,End date,time duration.But how to get the Calendar data for display purpose on each Control(title,startdate,enddate).
pls help me as soon as possible......