How to add Image button in Date slot

2 posts, 1 answers
  1. Manish
    Manish avatar
    64 posts
    Member since:
    Jul 2011

    Posted 22 Aug 2012 Link to this post

    Hi,

    I want to add a image button in Date slot area. How can i add. Please see attachment what i want to do. Please help

    Thanks
    Manish
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 Aug 2012 Link to this post

    Hi Manish,

    Try the following code snippet to achieve your scenario.

    CSS:
    <style type="text/css">
      .FloatRight
        {
          padding: 5px 0px 5px !important;
          float: right;
        }
    </style>

    C#:
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
        {
            ImageButton btn = new ImageButton();
            btn.ImageUrl = "~/Images/image.jpg";
            btn.CssClass = "FloatRight";
            e.TimeSlot.Control.Controls.AddAt(0, btn);
        }

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top