Hi.....
i have a Calendar Control and i want to customize such a way to show the saved event in there cell...with event title and appropriate tooltip ..
i am using this code..
CalendarMonth_DayRender(object sender, DayRenderEventArgs e)
{
ds = objplanner.getEvent(pid, e.Day.Date);
if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
if (ds.Tables[0].Rows[i]["Category"].ToString() == "Personal")
{
Label newLine = new Label();
newLine.Text = "<br/>";
e.Cell.Controls.Add(newLine);
LinkButton hlink = new LinkButton();
hlink.Text = "Personal";
hlink.ToolTip = ds.Tables[0].Rows[i]["Title"].ToString();
hlink.Attributes.Add("Align", "Center");
hlink.Style.Add("Font-Size", "8px");
hlink.Style.Add("padding-left", "30px");
hlink.Style.Add("padding-top", "50px");
hlink.ForeColor = System.Drawing.ColorTranslator.FromHtml("#B39BE4");
hlink.Attributes.Add("onClick", "hlink_onClick");
e.Cell.Controls.Add(hlink);
}
if (ds.Tables[0].Rows[i]["Category"].ToString() == "Reminder")
{
}
}
void hlink_onClick(object sender, EventArgs e)
{
Response.Redirect("~/WebForm1.aspx");
}
Problem 1...
although hlink is a LinkButton but i am not able to Click on it...??
i have also add onClick event but never execute..i dont know why ??
Problem 2..
the Calendar Cell Which contains any event Personal/Reminder or both
on that cell i am unable to click on date showed in cell ?????
Problem 3..
i have also add a image button in my calendarcontrol cell...
using e.Cell.Controls.Add(imgbtn)....in all cells it works fine but which cell contains any event ..i can not click on this button...
(problem same like 2 but)
Problem 4..
there can be more than one event for ant particular date falling in same category of Example
Personal...PersonalEvent1 8:00am-12:00am
PersonalEvent2 2:00pm-5:00pm...etc
in this condition i want to show only one event..but i want to show only one indicator in each cell..in this case two times personal will add in my calendar's cell...........
Pls suggest me something to solve these problems...
if any point hasn't cleared then please ..ask