Skip to main content

ResourceTreeControl.GroupCellTemplate Property

Gets or sets the template that defines the presentation of resource groups. This is a dependency property.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.2.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

[Browsable(false)]
public DataTemplate GroupCellTemplate { get; set; }

Property Value

Type Description
DataTemplate

A System.Windows.DataTemplate object that defines the presentation of resource groups.

Remarks

To enable synchronization with the ResourceTreeControl.Scheduler, use an editor shipped with the DevExpress Data Editors Library for WPF. Setting the editor’s Name to ‘PART_Editor‘ bounds the editor to a source field specified by the ResourceMappings.Group property of the SchedulerControl.DataSource.

See the example below.

        <dxsch:ResourceTreeControl Name="resourceTreeControl" Scheduler="{Binding ElementName=scheduler}" >
             <dxsch:ResourceTreeControl.GroupCellTemplate>
                <DataTemplate>
                     <StackPanel Orientation="Horizontal">
                         <dxe:TextEdit x:Name="PART_Editor" FontSize="14" />
                    </StackPanel>
                 </DataTemplate>
            </dxsch:ResourceTreeControl.GroupCellTemplate>
        </dxsch:ResourceTreeControl>

        <dxsch:SchedulerControl x:Name="scheduler" GroupType="Resource">
            <dxsch:MonthView />
            <dxsch:TimelineView />
            <dxsch:SchedulerControl.DataSource>
                <dxsch:DataSource
                    AppointmentsSource="{Binding Appointments}"
                    ResourcesSource="{Binding Calendars}"
                    AppointmentLabelsSource="{Binding Labels}"
                    ResourceSharing="True">
                    <dxsch:DataSource.AppointmentMappings>
                        <dxsch:AppointmentMappings
                            Id="Id"
                            AllDay="AllDay"
                            Type="AppointmentType"
                            Start="Start"
                            End="End"
                            Subject="Subject"
                            Description="Description"
                            Location="Location"
                            ResourceId="CalendarIds"
                            RecurrenceInfo="RecurrenceInfo"
                            StatusId="Status"
                            LabelId="Label" />
                    </dxsch:DataSource.AppointmentMappings>
                    <dxsch:DataSource.ResourceMappings>
                        <dxsch:ResourceMappings Id="Id" Caption="Name" Visible="IsVisible" Group="Group" />
                    </dxsch:DataSource.ResourceMappings>
                    <dxsch:DataSource.AppointmentLabelMappings>
                        <dxsch:AppointmentLabelMappings Id="Id" Caption="Caption"/>
                    </dxsch:DataSource.AppointmentLabelMappings>
                </dxsch:DataSource>
            </dxsch:SchedulerControl.DataSource>
        </dxsch:SchedulerControl>
See Also