calendar control

G

Guest

i guys,
i am adding table to cells in the day render event if condition is true.
However it increases the height of the cell and that row and there is lot of
empty space in the cell which makes me believe that it should not increase
the height unlesss it runs out of space in the cell. Is there any way i can
control this?

Here is my code:

foreach (DataRowView drv in dv)
{
year = drv["StartDate"].ToString().Substring(0,4).ToString();
month = drv["StartDate"].ToString().Substring(5,2).ToString();
day = drv["StartDate"].ToString().Substring(8,2).ToString();
DateTime e_date=Convert.ToDateTime(month+"/"+day+"/"+year);



if (e.Day.Date.ToString().Equals(e_date.ToString()))
{

temp.Append("<div align=left>");
temp.Append("<table cellpadding=1 cellspacing=0 border=0
style=\"border-top:1px solid #C1CDD8\" bgcolor=#ffffff>");
temp.Append("<tr>");
temp.Append("<td bgcolor='#ffffff' width=2></td>");
temp.Append("<td width=100%>");
temp.Append(drv["Subject"].ToString());
temp.Append("</td></tr>");
temp.Append("</table></div>");
e.Cell.Controls.Add(new LiteralControl(temp.ToString()));
temp.Remove(0,temp.Length);
bit=1;
}



}

if (bit==1)
{
temp.Append("<table cellpadding=1 cellspacing=0 border=0
style=\"border-top:1px solid #C1CDD8\" bgcolor=#ffffff>");
temp.Append("<tr>");
temp.Append("<td bgcolor='#ffffff' width=2></td>");
temp.Append("<td width=100%> </td></tr></table>");
e.Cell.Controls.Add(new LiteralControl(temp.ToString()));
}


//Response.Write(dv.Count);




Thanks

manny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top