YouTip LogoYouTip

Prop Webcontrol Calendar Showgridlines

## ASP.NET Calendar ShowGridLines Property The `ShowGridLines` property is a member of the ASP.NET WebControl Calendar class. It is used to specify whether grid lines should be displayed to separate the individual days (dates) in the Calendar control. --- ## Definition and Usage By default, the `ShowGridLines` property is set to `False`, meaning that no grid lines are displayed between the calendar cells. To display grid lines and create a structured grid layout for the dates, you must set this property to `True`. --- ## Syntax ```xml ``` ### Property Values | Value | Description | | :--- | :--- | | `True` | Grid lines are displayed between the days in the calendar. | | `False` | Grid lines are hidden (Default). | --- ## Code Example The following example demonstrates how to set the `ShowGridLines` property to `True` in an ASP.NET Web Forms page (`.aspx`): ```xml <%@ Page Language="C#" %> ASP.NET Calendar ShowGridLines Example

Calendar with Grid Lines Enabled

``` --- ## Considerations and Styling * **Grid Line Color and Style:** The appearance of the grid lines (such as color, width, and style) is determined by the browser's default table border rendering, or it can be customized using CSS or other Calendar styling properties like `BorderColor`, `BorderWidth`, and `BorderStyle`. * **Visual Structure:** Enabling grid lines is highly recommended when you have a dense calendar layout or when you want to clearly distinguish boundaries between adjacent dates, especially when using custom cell rendering (`OnDayRender`).
← Prop Webcontrol Calendar ShownProp Webcontrol Calendar Selec β†’