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
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