# C1.Win.Schedule.C1Schedule.BeforeGroupHeaderFormat

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_Win_Schedule_C1Schedule_BeforeGroupHeaderFormat" data-uid="C1.Win.Schedule.C1Schedule.BeforeGroupHeaderFormat" class="text-break">BeforeGroupHeaderFormat Event
</h1>
<div class="markdown level0 summary"><p>Occurs before the group header is formatted.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.Schedule.html">C1.Win.Schedule</a></h6>
<h6><strong>Assembly</strong>: C1.Win.Schedule.10.dll</h6>
<h5 id="C1_Win_Schedule_C1Schedule_BeforeGroupHeaderFormat_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Description(&quot;BeforeGroupHeaderFormat&quot;, &quot;Fired before the group header is formatted.&quot;)]
[C1Category(&quot;UI&quot;)]
public event EventHandler&lt;BeforeGroupHeaderFormatEventArgs&gt; BeforeGroupHeaderFormat</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Description(&quot;BeforeGroupHeaderFormat&quot;, &quot;Fired before the group header is formatted.&quot;)&gt;
&lt;C1Category(&quot;UI&quot;)&gt;
Public Event BeforeGroupHeaderFormat As EventHandler(Of BeforeGroupHeaderFormatEventArgs)</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.eventhandler-1">EventHandler</a>&lt;<a class="xref" href="C1.Win.Schedule.BeforeGroupHeaderFormatEventArgs.html">BeforeGroupHeaderFormatEventArgs</a>&gt;</td>
      <td>Occurs before the group header is formatted.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_Schedule_C1Schedule_BeforeGroupHeaderFormat_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>Use this event to alter default group header appearance.
You can change group header style, tab shape or displayed content.</p>
</div>
<h5 id="C1_Win_Schedule_C1Schedule_BeforeGroupHeaderFormat_examples"><strong>Examples</strong></h5>
<p>This sample shows how to alter group header appearance depending on <a class="xref" href="C1.Win.Schedule.BeforeGroupHeaderFormatEventArgs.html">BeforeGroupHeaderFormatEventArgs</a> properties.
<pre><code class="lang-csharp">private void c1Schedule1_BeforeGroupHeaderFormat(object sender, BeforeGroupHeaderFormatEventArgs e)
{
Contact owner = e.Group.Owner as Contact;
if (owner != null)
{
TestSchedule.NwindDataSet.EmployeesRow row = this.nwindDataSet.Employees.FindByEmployeeID((int)owner.Key[0]);
if (row != null)
{
string imageName = &quot;photo&quot; + row.EmployeeID + &quot;.bmp&quot;;
if (File.Exists(imageName))
{
// use image from file
// note, C1Schedule only accepts images from internet (http://..),
// application resources (res://..) and local file system (file:///...).
e.Html = row.FirstName + &quot; &quot; + row.LastName + &quot;&lt;br&gt;&lt;img src=file:///&quot; + imageName + &quot;/&gt;&quot;;
}
}
}
if (e.Style.Hot != null)
{
// Hot style is applied to the group header when ScheduleGroupItem is selected.
e.Style.Hot.BackColor2 = e.Style.Hot.BorderColor = Color.DarkSlateGray;
e.Style.Hot.ForeColor = Color.WhiteSmoke;
}
// use rectangular tab
e.TriangleTab = false;
}</code></pre>

</div>
