Telerik Calendar with Office365

Chris

Hello, I have a Xamarin.Forms with
C# application that I am developing.
At the moment the user can log in and authenticate using Azure AD.
They are then taken to a XAML tabbed page that uses a ‘Telerik’ calendar
control.
I need to bind the event data from office365 into this control.
I also have 2 list views that need to bind data from Office365 through the API.
These will be listed as tasks and contacts.
The user should be able to add, edit and delete said contacts/tasks.
Can anyone assist with this?
Thanks

To summarize, the UI for Xamarin controls do not perform CRUD operations on the O365 API automatically for you. You need to get the data in order to display it in the ListView or Calendar.

As far as editing operations are concerned, this is also something you need to have implemented so that you can interact with the API. The user adds or edits the in-memory object and you send the new/changed item back to the API.

Regarding the ListView
The ListView isn't as restrictive as the Calendar because you don't need to implement IAppointment interface. You can directly bind the ItemSource of the ListView to whatever IEnumerable object you've loaded the O365 data into.

In your example, you state that the ListView would be using Contacts and Tasks. So in your ViewModel (or if you're not using MVVM, the code behind), you have your API result already deserialized into a CLR type.

For example, heres a simplified Contact class:

public class Contact

{

public string FirstName {get;set;}

public string LastName {get; set;}

}

In your view model/code-behind/service class you'd have a collection of these contacts:

public ObservableCollection<Contact> Contacts {get;set;}

private Task<ObservableCollection> GetContactsFromO365Async()
{
// Your API logic would be in something like this
}

With this you can make a call to your API, and deserialize the response into the Contacts collection. With the Contacts collection populated, you can bind to, or set, the ListView.ItemsSource property and have the appropriate ItemTemplate.

See this example to learn how to set it programmatically, and here is an example of binding it in the XAML

Please note that if you have any further questions, please post in the original thread as this is a duplicate thread. This will allow us to provide you with better support by keeping identical answers in the same place.

Thank you for contacting Support and for choosing Telerik by Progress.

Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress

Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.