Paul Aikman
Top achievements
Rank 1
Paul Aikman
asked on 02 Dec 2009, 04:56 PM
Hi,
I'd like to know if I can update the Resource Header width without making every column in the scheduler a larger size?
Have tried the "RowHeaderWidth" option, giving the following result (see attached)...
Edit: May be a bug - doesn't work in IE 8 compatibility mode but does in IE8 standard. Doesn't work in IE6 (needs to work in IE6), works in firefox. Any workaround possible?
Cheers,
Paul
I'd like to know if I can update the Resource Header width without making every column in the scheduler a larger size?
Have tried the "RowHeaderWidth" option, giving the following result (see attached)...
Edit: May be a bug - doesn't work in IE 8 compatibility mode but does in IE8 standard. Doesn't work in IE6 (needs to work in IE6), works in firefox. Any workaround possible?
Cheers,
Paul
3 Answers, 1 is accepted
0
Hi Paul,
Can you post the declaration of the resource header template that you're using? We should be able to fix it to work in IE8.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Can you post the declaration of the resource header template that you're using? We should be able to fix it to work in IE8.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Paul Aikman
Top achievements
Rank 1
answered on 09 Dec 2009, 10:19 AM
Hi guys,
This is as far as I got:
| <ResourceHeaderTemplate> |
| <div id="ResourceDiv" runat="server" > |
| <asp:Label ID="ResourceLabel" runat="server" Text="Label" Font-Bold="true"></asp:Label> |
| <br /> |
| <asp:Label ID="IDLabel" runat="server" Text=""></asp:Label> |
| <br /> |
| <asp:Label ID="TelNoLabel" runat="server" Text=""></asp:Label> |
| </div> |
| </ResourceHeaderTemplate> |
And in the code-behind:
| protected void OnResourceHeaderCreated(object sender, ResourceHeaderCreatedEventArgs e) |
| { |
| Resource resource = e.Container.Resource; |
| ((Label)e.Container.FindControl("ResourceLabel")).Text = resource.Text; |
| ((Label)e.Container.FindControl("IDLabel")).Text = "ID: " + resource.Attributes["ResID"]; |
| // Bind custom attributes based on Resource Type |
| if (resource.Attributes["ResType"] == "Staff") |
| { |
| // Bind Staff attributes |
| ((Label)e.Container.FindControl("TelNoLabel")).Text = "Tel No: " + resource.Attributes["ResPhone"]; |
| } |
| ((HtmlGenericControl)e.Container.FindControl("ResourceDiv")).Style.Add("Width", "100%"); |
| ((HtmlGenericControl)e.Container.FindControl("ResourceDiv")).Style.Add("Height", "100%"); |
| ((HtmlGenericControl)e.Container.FindControl("ResourceDiv")).Style.Add("background-color", resource.Attributes["ResTeamColour"]); |
| } |
Now that's fine for IE8 and FireFox, but in Chrome the background only covers part of the box - I'd like it to fill the whole area if possible. Please see attached screen..
Cheers,
Paul
0
Hi Paul,
I've modified it slightly for the test, but it should behave just the same.
Maybe some other CSS styles on the page are interfering with the templates. Can you try isolating the scheduler in a simple page? If this doesn't solve the problem you should send it to us, so we can try to determine the exact problem.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I've tested the resource header template and it seems to work properly in Chrome. I've tested it both in the official and Beta versions.
I've modified it slightly for the test, but it should behave just the same.
<ResourceHeaderTemplate> <div id="ResourceDiv" runat="server" style="width: 100%; height: 100%; background-color: #f00;"> <asp:Label ID="ResourceLabel" runat="server" Text="Label" Font-Bold="true"><%# Eval("Text") %></asp:Label> <br /> <asp:Label ID="IDLabel" runat="server" Text="">Test</asp:Label> <br /> <asp:Label ID="TelNoLabel" runat="server" Text="">Test</asp:Label> </div> </ResourceHeaderTemplate>Maybe some other CSS styles on the page are interfering with the templates. Can you try isolating the scheduler in a simple page? If this doesn't solve the problem you should send it to us, so we can try to determine the exact problem.
Regards,
Tsvetomir Tsonev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.