More in this section

Forums / Developing with Sitefinity / Event Content Missing

Event Content Missing

2 posts, 0 answered
  1. Gregory
    Gregory avatar
    25 posts
    16 Mar 2009
    13 Apr 2009
    Link to this post
    I'm working on a calendar view control for events and have it working for the most part, however I am unable to get all of the information for the event. There does not seem to be a way to get the phone numbers, locations and the like. This is the code for displaying the data, the calendar calls this when you click on a day.
     Telerik.Events.EventsManager eventsManager = new Telerik.Events.EventsManager("Events");  
           IList listOfAllEvents2;  
    protected void dayselected(object sender, EventArgs e)  
            listOfAllEvents2 = eventsManager.GetEvents(EventCalendar1.SelectedDate.Date, EventCalendar1.SelectedDate.Date.AddDays(1).AddSeconds(-1), "[Start] ASC");  
            int idnumber = 0;  
            string eventcontent = "";  
            string newcontent = "";  
            foreach (Telerik.Events.IEvent eventItem in listOfAllEvents2)  
                eventcontent = eventItem.ContentItem.Content.ToString();  
                newcontent = replacesrc(eventcontent);  
                HtmlGenericControl div1 = new HtmlGenericControl("div");  
                div1.ID = "div"+idnumber.ToString();  
                div1.InnerText = "<h1>" + eventItem.EventTitle.ToString() + "</h1><br/> Start Date: " + eventItem.Start + "<br/> End Date: " + eventItem.End + "<br/> " + newcontent +"<br/>"+ theContentItem.GetMetaData("Contact_Phone");  
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    14 Apr 2009
    Link to this post
    Hi Gregory,

    By default the metafield key is Contact_Phone - with underscore. Check whether this will fix the problem you have.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered