1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Events Scheduler View

Events Scheduler View

4 posts, 0 answered
  1. Smitha
    Smitha avatar
    22 posts
    Registered:
    29 Oct 2008
    31 Oct 2008
    Link to this post
    Hi!

    I am using Sitefinity for the first time.
     I have created a page and added Events Sheduler View to it.  I am adding this to develop a personal calender. I would like to double click on a day and add an event that is the cell has to convert itself to textbox and store the details of my event. How do I achive this. Do I write some on click event? If yes where do I write it?

    Thanks!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Nov 2008
    Link to this post
    Hello Smitha,

    Thank you for contacting us.

    Sitefinity EventsScheduleView control does not provide the desired functionality out of the box. So you need to create your own custom control similar to EventsScheduleView and implement it by yourself.

    For your convenience I have attached the current implementation of Sitefinity EventsScheduleView control. You need to modify it according to your requirements. For details check out the following links:
    Finally, you should register your control in the project web.config to display it in Add Controls toolbox:

    <toolboxControls> 
            <clear /> 
            <add name="Custom EventsScheduleView" section="Events" type="Telerik.Events.WebControls.CustomEventsScheduleView, App_Code" /> 
    .... 
    </toolboxControls>

    I hope this helps.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Smitha
    Smitha avatar
    22 posts
    Registered:
    29 Oct 2008
    04 Nov 2008
    Link to this post

     Ivan,
    What I am trying is creating a user control and in the click event of the button written the following code
    ________________________________________

    string providerName = Telerik.Events.EventsManager.DefaultContentProvider;

    Telerik.Events.EventsManager eventmgr = new Telerik.Events.EventsManager(providerName);

    Telerik.Cms.Engine.ICategory newevent = eventmgr.CreateCategory();

    newevent.CategoryName = TxtEventDescription.Text.ToString();

    newevent.DateCreated = DateTime.Now.AddDays(1);

    eventmgr.SaveCategory(newevent);

    _______________________________________________________

    but the event is not saved.

    Can you tell me if the above code is correct?
    Do I have to publish it after I save it?

    I have the publish method only in the SaveContent option.

    I don’t see the event in my existing Events view Scheduler or am I missing something like, adding the event to the event view scheduler. If so how do I add it to my existing event view container?

    Thanks!
    Smitha.

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    06 Nov 2008
    Link to this post
    Hi Smitha,

    As I see in your example you save Category instead of an event. Please comment the lines below form the code I sent you in my previous post.

     protected override void CreateChildControls() 
            { 
                Controls.Clear(); 
    .... 
    container.EventsSchedule.AllowDelete = false
    container.EventsSchedule.AllowInsert = false
    container.EventsSchedule.AllowEdit = false
     
    .... 
           } 


    Here is an example that demonstrates how to create an event item.

    // create new instance of EventsManager 
    EventsManager eventsManager = new EventsManager(); 
    IContent cnt = eventsManager.Content.CreateContent(); 
    cnt.Content = "My first content...."
    // set meta keys for the item 
    cnt.SetMetaData("Name""Myname"); 
    cnt.SetMetaData("Author""Authname"); 
    //save 
    EventsManager.SaveContent(cnt); 

    RadScheduler requires some sort of data binding so that it can store and retrieve the information it display. For instance you could Implement a new provider. Check out Modules API Overview




    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered