Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Scheduler > Dynamic group

Not answered Dynamic group

Feed from this thread
  • L Master avatar

    Posted on Feb 3, 2012 (permalink)

    hi

    based on the example you have http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceheadertemplates/defaultvb.aspx
    where your 4 speakers has static settings in the resource style and mapping.

    I am having an eviromment where my speakers are very dynamic. we engage many different speakers on an assignment basis and we insert speaker as we engage them and delete them when don't require their speaking engagement.

    Grouping is done vertically and we uses Timeline to display speakers on the left without displaying time.

    How do i go about it doing dynamically?

    Thanks

    Reply

  • L Master avatar

    Posted on Feb 3, 2012 (permalink)

    hi

    I have found a solution to the question above.

    Now, i have a question on Resource Header Template and this is what i have.

    <ResourceHeaderTemplate>
        <div id="ResourceDiv" runat="server">
              <asp:Label ID="ResourceLabel" runat="server" BackColor="AliceBlue" Text="Label"></asp:Label>
        </div>             
    </ResourceHeaderTemplate>

    Protected Sub RadScheduler1_ResourceHeaderCreated(ByVal sender As Object, ByVal e As ResourceHeaderCreatedEventArgs)
            DirectCast(e.Container.FindControl("ResourceLabel"), Label).Text = e.Container.Resource.Text
            DirectCast(e.Container.FindControl("ResourceDiv"), HtmlGenericControl).Style.Add("Background", "Green")
    End Sub


    I am not able to set each of the resources a different background color. It is now all green.

    How do i set each resources a different background color using for loop or while loop? Thanks

    Reply

  • Ivana Ivana admin's avatar

    Posted on Feb 7, 2012 (permalink)

    Hello,

    You could use the following approach:
    protected void RadScheduler1_ResourceHeaderCreated(object sender, ResourceHeaderCreatedEventArgs e)
    {
        Label user = e.Container.FindControl("ResourceLabel") as Label;
        user.Text = e.Container.Resource.Text;
        user.CssClass = "class_" + user.Text;
    }
    .class_Charlie
    {
        background-color: Red;
    }
    .class_Alex
    {
        background-color: Blue;
    }
    .class_Bob
    {
        background-color: Yellow;
    }
    Where Charlie, Alex, and Bob are the users against which the grouping is defined.

    You can find out more about  working with resources at the following help article: [http://www.telerik.com/help/aspnet-ajax/scheduler-working-with-resources.html].

    I hope this helps.

    All the best,
    Ivana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Scheduler > Dynamic group
Related resources for "Dynamic group"

ASP.NET Scheduler Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial ]