2010-06-16 158 views

回答

5

您可以在控件中爲dayrender事件創建方法。類似這樣的:

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) 
{ 
    if (e.Day.Date.DayOfWeek != DayOfWeek.Sunday) return; 

    e.Cell.ApplyStyle(new Style { BackColor = System.Drawing.Color.Gray }); 
    e.Day.IsSelectable = false; 
}