[]
        
(Showing Draft Content)

C1.Win.Schedule.C1Schedule.BeforeGroupHeaderFormat

BeforeGroupHeaderFormat Event

Occurs before the group header is formatted.

Namespace: C1.Win.Schedule
Assembly: C1.Win.Schedule.8.dll
Syntax
public event EventHandler<BeforeGroupHeaderFormatEventArgs> BeforeGroupHeaderFormat
Returns
Type Description
EventHandler<BeforeGroupHeaderFormatEventArgs> Occurs before the group header is formatted.
Remarks

Use this event to alter default group header appearance. You can change group header style, tab shape or displayed content.

Examples

This sample shows how to alter group header appearance depending on BeforeGroupHeaderFormatEventArgs properties.

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 = "photo" + row.EmployeeID + ".bmp";
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 + " " + row.LastName + "<br><img src=file:///" + imageName + "/>";
}
}
}
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;
}