Asked by Anonymous
19 years ago.
if (c is DayPilotCalendar)
((DayPilotCalendar)c).StartDate = Calendar1.SelectedDate;
}
foreach(Control c in this.Controls)
if (c is DayPilot.Web.Ui.DayPilotCalendar)
((DayPilotCalendar)c).StartDate = Calendar1.SelectedDate;
foreach(Control c in this.Page.Controls)
if (c is DayPilot.Web.Ui.DayPilotCalendar)
((DayPilotCalendar)c).StartDate = Calendar1.SelectedDate;
foreach(Control c in Controls)
if (c is DayPilot.Web.Ui.DayPilotCalendar)
((DayPilotCalendar)c).StartDate = Calendar1.SelectedDate;
The above all are not working.
I have added the control inside the table
tablecell.Controls.Add(dpc);
but its not going inside the if condition. Why?
Comment posted by Anonymous
19 years ago.
and i got three filed name, address and city.
the display @ event like below:
name
address
city
i dont want to display time in the event.
Comment posted by Dan Letecky
19 years ago.
Question #1:
The DayPilot control might be inside another control. Use this method:
private static Control recursiveFind(Control parent, string id)
{
Control found = parent.FindControl(id);
if (found != null)
return found;
foreach (Control c in parent.Controls)
{
found = recursiveFind(c, id);
if (found != null)
{
return found;
}
}
return null;
}
And call it this way:
DayPilotCalendar dpc = recursiveFind(this.NamingContainer, "DayPilotCalendar1");
Question #2:
Handle BeforeEventRender event and modify e.InnerHTML property. The demo can be seen here:
http://www.daypilot.org/demo/Horizontal/CustomEventFormatting.aspx
The source code is included in the DayPilot Pro package (both full and
trial).
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.