I was able to get what I wanted accomplished here. I have a month-view timeline with resource grouping. There's a panel docked at the top and bottom, with the scheduler docked to fill the center.
The bottom panel is set to height 20. In it, I have a RadLabel docked to the left side. A RadGridView of height 40 is docked to the top in the center. I had to set the grid height to at least 40 or else it would show scroll bars. The DataSource of the
RadGridView is a 1-row DataTable with 12 columns.
To handle the column sizing and scrolling (if SchedulerTimescale.DisplayedCellsCount < 12), I added this to the Form_Load():
Here's the UpdateLayout() method:
void UpdateLayout(object sender, EventArgs e)
{
TimelineGroupingByResourcesElement timeline = this.radScheduler1.SchedulerElement.ViewElement as TimelineGroupingByResourcesElement;
//match label width to resource header width
lblGridHeader.Width = timeline.ResourceHeaderWidth;
List<SchedulerTimelineViewElement> elements = timeline.GetTimelineElements();
//set main header title
SchedulerHeaderCellElement headerElement = elements[0].Header.Children[0] as SchedulerHeaderCellElement;
headerElement.Text = "Main Header Title";
radGridView1.SuspendLayout();
//hide every column
for (int i = 0; i < radGridView1.Columns.Count; i++)
{
radGridView1.Columns[i].IsVisible = false;
}
for (int i = 1; i < elements[0].Header.Children.Count; i++)
{
headerElement = elements[0].Header.Children[i] as SchedulerHeaderCellElement;
//shorten month column title to 3 letters
headerElement.Text = headerElement.Text.Substring(0, 3);
//unhide corresponding column and match column width
radGridView1.Columns[headerElement.Date.Month - 1].IsVisible = true;
radGridView1.Columns[headerElement.Date.Month - 1].Width = headerElement.Size.Width + 1;
}
radGridView1.ResumeLayout();
}
Hopefully this will be useful to anyone else with this requirement.