Telerik Forums
UI for Xamarin Forum
9 answers
195 views

I've created the follow example to show the problem.  When I select a date in the calendar and try to have it go to a new page it crashes.  I believe what is happening is the calendar is trying to updated the selected date on the current view however that view is no longer available because the page has been updated.  If I'm doing something wrong can someone point me in the right direction.  I believe this is a bug.

 

Telerik for Xamarin UI Calendar control.

 

public App()
{
RadCalendar radCalendar = new RadCalendar();
var PageTwo = new ContentPage
{
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
new Label {
XAlign = TextAlignment.Center,
Text = "Page Two Welcomes You!!!"
}
}
}
};
radCalendar.WidthRequest = 200;
radCalendar.HeightRequest = 500;
radCalendar.SelectionChanged +=
(object sender, ValueChangedEventArgs<object> e) =>
{
var selectedDate = e.NewValue as DateTime?;
MainPage = PageTwo;
};
// The root page of your application
MainPage = new ContentPage { Content = radCalendar };
}

 

Joe

 

Ves
Telerik team
 answered on 19 Oct 2015
1 answer
161 views

Hi,

I try to create a custom calendar renderer in my project like : http://docs.telerik.com/devtools/xamarin/controls/calendar/how-to/calendar-how-to-create-custom-renderer to change the color of the appointments.

But i have some problem with IOS... I did not find how to get all events in the control , there is only " this.Control.EventsForDate()"  but you need to put a date on it. I don't see the light to do this :/

 

Can someone help me please ?

 

Thanks

Jack
Telerik team
 answered on 14 Oct 2015
1 answer
136 views

Hello,

 

I have issue to validate my dataForm on button click in iOS.

For Android we have this method hasValidationErrors (see attached images). But I can't find anything similar for iOS. 

Can you please advise if there is anything that could help me resolve this issue.

 

Best regards,

Ana

Jack
Telerik team
 answered on 13 Oct 2015
8 answers
324 views

Hi there,

I am evaluating Visual Studio 2015 RC with Xamarin (IOs+Android, business) and Telerik extensions.

If I install the Telerik extensions via the control Panel I cannot install the "UI for Xamarin Cross-Plattform" part because it says that Xamarin is missing.

But it is installed!

Does the current Version of UI for Xamarin recognize Visual Studio 2015?

 

Best Regards

Markus

 

 

 

Momchil
Telerik team
 answered on 08 Oct 2015
1 answer
208 views

Since installing the Q3 trial, the code which I've been executing has stopped working once I've changed the selected date. 

public MyCalendar()
{
     InitializeComponent();
     radCalendar.SelectionChanged += RadCalendar_SelectionChanged;
}

 

private void RadCalendar_SelectionChanged(object sender, ValueChangedEventArgs<object> e)
{
     DateTimeSelected = radCalendar.SelectedDate;
     List<IAppointment> calendar = (List<IAppointment>)radCalendar.AppointmentsSource;
     var selectedAbsences = calendar.Where(a => DateTimeSelected.Value.Date >= a.StartDate.Date && DateTimeSelected.Value.Date <= a.EndDate.Date).Select(a => a);
}

Can anyone give any advice as to why this is not firing?

 

 

 

Vladislav
Telerik team
 answered on 07 Oct 2015
1 answer
89 views

Hi,

 I'm using a custom cell for the calendar.  It is working fine, the only problem i'm running into is that the calendar originally loads with the old cells appearence, and it is not until I call Calendar.Update() that I can see my cells load in.  I haven't been able to figure a way to have it use the custom cells on its first load, so there is always a brief second or two where the calendar appears to be the old one before swapping to using my custom cells.

 

The code that sets my custom cells is:

 

Public override TkCalendarCell VIewForCellOfKind(.....){
 
     if(cellType == TKCalenarCell.Day){
          return new CustomCell();
     }
}
 
 
public override void UpdateVisualsForCell(...){
    //Do all my custom cell formatting.
 
}

 

 

 

Is there any way to set up the calendar to use my custom cell on its first render?

Thanks

Adrian
Telerik team
 answered on 06 Oct 2015
6 answers
200 views

Hi -

I've created a very simple project (Xamarin Forms PCL with iOS and Android) and am having trouble with the iOS portion for the Telerik ListView. 

 The project is on GitHub here and should be runnable -- it runs correctly on Android, and also runs on iOS but the ListView is not rendered:

https://github.com/dahlsailrunner/TelerikSample

 

Here are some notes about the project:

* It uses Prism for MVVM and all refs are added

* It uses XLabs to use some other controls like ImageButton and Checkbox which are more feature-rich than core Xamarin Forms at this point

* It has the refs for Telerik as described in the Getting Started article for Xamarin Forms ListView.

The MainPage is loaded at startup by the Prism Bootstrapper class, and the ViewModel with it also gets instantiated properly.  I have some mocked data returned and am trying to display it in a list view when the MainPage displays.  This works perfectly on Android.

On iOS, I can't get it to work.  My AppDelegate.cs is shown below.  If I comment in the ExportRenderer line, the app fails to start with a "obj cannot be null" error (this should be easily reproduced if you like via the GitHub source - which should be runnable assuming you have the refs taken care of.

I believe it's not working because I haven't been able to properly export the ListView Renderer for iOS, but I'm not sure why that doesn't work.

Any help / guidance is appreciated.

-Erik

 

using System;
using System.Collections.Generic;
using System.Linq;
 
using Foundation;
using UIKit;
using XLabs.Forms;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using Telerik.XamarinForms.DataControlsRenderer.iOS;
 
//[assembly: Xamarin.Forms.ExportRenderer(typeof(Telerik.XamarinForms.DataControls.RadListView), typeof(Telerik.XamarinForms.DataControlsRenderer.iOS.ListViewRenderer))]
 
namespace TelerikSample.iOS
{
    // The UIApplicationDelegate for the application. This class is responsible for launching the
    // User Interface of the application, as well as listening (and optionally responding) to
    // application events from iOS.
    [Register("AppDelegate")]
    public partial class AppDelegate : FormsApplicationDelegate //XFormsApplicationDelegate//global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            new Telerik.XamarinForms.DataControlsRenderer.iOS.ListViewRenderer();           
 
            Forms.Init();
            LoadApplication(new App());
             
            return base.FinishedLaunching(app, options);
        }
    }
}
 

 


 
Pavel R. Pavlov
Telerik team
 answered on 05 Oct 2015
1 answer
111 views

Is it possible to do aggregates in a ListView's GroupHeaderTemplate?

Consider a POCO like:

public class ProductSales

{

     public string Category {get; set;}

     public string ProductName {get;set;}

     public int QtySold {get;set;}

     public decimal SoldAmt {get;set;}

}

And then you want to show a list of those items in a ListView, grouped by Category.  You might want to include a sum of both the QtySold and SoldAmt properties in the group header, and maybe even a count of the ProductName values. 

Is this possible?

 

Thanks -

Erik

Tsvyatko
Telerik team
 answered on 05 Oct 2015
3 answers
202 views

Hi,

 I have built a Xamarin Forms app that uses the Telerik Calendar control for Xamarin.  Control works great in an Android emulator but when I deploy app to an actual device the calendar displays but is non-responsive.  I cant choose a date or scroll to the next month.  When I click on a day what will happen is I will get the Android dialog box that gives the option of "Wait" or "Close". The rest of the app works fine

 Is there anything that I need to do in order to deploy this control?  For now I am just using Visual Studio - Tools - Android - Publish Android app to create the APK and then i just copy APK file onto phone.

 Xamarin version: 3.11.590.0

Telerik: UI for Xamarin Q1 2015

Jack
Telerik team
 answered on 01 Oct 2015
22 answers
368 views
I'm very interested in the new ListView. Where would I find an in depth example of how to use it? I already did the getting started example at http://docs.telerik.com/devtools/xamarin/controls/listview/listview-getting-started . However I would like to eventually go beyond just simple strings in each cell which is all the "getting started" example shows.  On the telerik xamarin blog Nikolay Diyanov mentioned an SDKBrowser example app that showcases various features of ListView. That sounds like exactly what I'm looking for. Does anyone know where I could find that? 
Ves
Telerik team
 answered on 30 Sep 2015
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?